In my project the maven-antrun-plugin is used and in a number of places a property named
project.build.directory
is referenced but i can't understand to what value this property is set. I tried to google and found couple of places where this was mentioned but could not find a formal note on, to what value this property is set.
Also, since I am using the maven-antrun-plugin, it would be nice if you tell me this property is set by Maven or Ant.
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.