project.build.directory
is a maven property available as is when your ant script is embedded in your pom.xml
If you call an external ant build file, this property will be available under maven.project.build.directory
By default the value of this property is the target
directory.
This default value can be changed by adding a <directory>
element in the <build>
section of your pom.xml:
<build>
<directory>something</directory>
...
</build>
More about maven properties in maven-antrun-plugin here
Specific quotes from this source:
All of the properties available to maven are also available in the target configuration. However, you may want to call an external Ant build script using the ant task. To avoid name conflicts, only a subset of the properties are passed to the external Ant build. These include all properties defined in the properties section of the POM. It also includes prefixed versions of some of the commonly used Maven properties.