I have a project that uses ivy to manage its dependencies. I am implementing a project function that requires me to enable tools.jar. however, since tools.jar is platform dependent, I am trying to use ivy to allow a local file for an artifact. I do the following:
<dependency org="com.sun" names="tools" rev="1.6.0"> <artifact name="tools" type="jar" url="file:///${java.home}/../lib/tools.jar"/> </dependency>
which should extract the file from the local $ {java.home} /../ lib / tools.jar. (note: java.home indicates a JRE installation).
however, there are problems resolving the location. on my windows machine, it seems that βcβ is the protocol (c comes from $ {java.home}. And I'm sure my url is defined correctly, because βfile: /// C: / fooβ is the correct way is to specify the file url (3 slashes). The problem I see is that it removes 2 slashes and tries "file: / C: ..." instead of "file: /// C: .. "as I indicated above. I also tried to specify the file path directly without $ {java.home}
I would like this approach to come back through ivy, but I can't get it to work. any ideas?
source share