I have a property file containing absolute paths to jars etc. When using these properties they are prefixed with the basedir specified in the build file. How do I get the absolute path?
build.properties:
mylib=/lib/mylib.jar
build.xml:
<project name="myproject" basedir=".">
<property file="build.properties"/>
...${mylib}...
</project>
Please take a look at the property task :
http://ant.apache.org/manual/Tasks/property.html
By using the location attribute e.g. :
This will expand any relative properties to their full absolute path. Of course the path is expanded relatively to the project’s basedir.