The best sources of information are:
Each ant script requires two files, which have to be named following the conventions for ant plugins:
So if you want to add a new foo-bar ant script you would create a foo-bar.build.xml
ant script file and foo-bar.mojos.xml mapping document.
Both these files should be located in the src/main/scripts directory.
If you want to access variables from the component's pom.xml in the ant script
then you need to do two things in the mapping document:
<requiresProject>true</requiresProject><parameter> elements for each of the variables you
want to use.
This plugin uses commons as the goal prefix. So if you add a new foo-bar
goal, then it can be executed on the command line using mvn commons-build:foo-bar. This prefix
is defined in this plugin's
pom.xml.
Not a lot to say about this except, if you need access to additional variables from the component's
pom.xml in the ant build script then you will need to define additional parameters
for these in the associated mapping document.
The message level for ant is info by default. Running the plugin goal using a message level of debug can help in discovering problems - for example:
mvn commons-build:jira-page -DantMessageLevel=debug
Copyright © 2008-2025 The Apache Software Foundation. All Rights Reserved.