In Ant, the .
can be used to reference a base directory. I have a legacy project with one Ant file in the /build
directory calling an Ant file in the /src
directory (in this post I use /
for relative directories to the project directory).
Now when I execute the Ant file in the /build
directory, .
is /build
and when the process flows to the Ant file in /src
the value of .
in that file is /src
.
Now I try to wrap the whole build in Maven. I put a pom.xml into the main directory and called the build file by
<ant antfile="cbuild.xml" dir="./build" target="all" />
In cbuild.xml
, the value of .
is /build
, but in the build file in /src
the .
now evaluates to /build
as well.
How does this happen? Can I do anything about it?