In the build.xml of my project I have a property defined:
<property name="somedir.dir" location="my_project/some_dir"/>
The value of "${somedir.dir}" will be an absolute path: "/home/myuser/my_project/some_dir". But what I need is just the relative path "./my_project/some_dir" without the ${basedir} value "/home/myuser". How can I achieve this in Ant?
So far I found a solution by converting the property to a path and then use "pathconvert", but I don't think this is a nice solution:
<path id="temp.path">
<pathelement location="${somedir.dir}" />
</path>
<pathconvert property="relative.dir" refid="temp.path">
<globmapper from="${basedir}/*" to="./*" />
</pathconvert>
Any other (more elegant) suggestions? Thanks!