Let's say I have a file-system that looks a little something like this:
- C:\stuff\build.xml
- C:\stuff\myfolder\library1.jar
- C:\stuff\myfolder\library2.jar
Inside build.xml, I want to define a path that looks like this:
<path id="some.id">
<fileset dir="myfolder">
<include name="**/*.jar"/>
</fileset>
</path>
Normally that works fine. However, I am calling my own custom Ant Task that will inherit any references (including the path "some.id") and that custom Ant Task will call a build.xml that lives in a different basedir. Therefore, the "dir" attribute in the fileset is no longer valid.
Is there a way to define a "dir" such that it remains valid no matter where the second build.xml lives?
I essentially want to do something like this:
<fileset dir="${expand.current.directory}/myfolder">
So when I call the second build.xml it will understand that the "dir" attribute is the location of:
<fileset dir="c:\stuff\myfolder">
Edit: Furthermore, I want a solution that allows me to copy the "stuff" project from one machine to another without requiring a change to the build. For example, if the "stuff" project is on the C: drive and I copy the project over to a D: drive on another machine, I want the build to continue to work without me having to go into the build and change the letter C to the letter D.