0

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?

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142
  • Wrapping is a bad idea..better migrate the project ot Maven... – khmarbaise Jan 10 '17 at 13:51
  • @khmarbaise: The Ant build files of the project are maintained by a group in a different branch of our company. My task is to make every project compatible with Maven/Nexus. I try to migrate as much as possible to Maven, but if the Ant build is very complex and the responsible group has little time, we need to have an alternate solution. – J Fabian Meier Jan 10 '17 at 14:36

0 Answers0