Plugin Documentation
Goals available for this plugin:
| Goal | Description |
|---|---|
| buildnumber:create | This mojo is designed to give you a build number. So when you might make 100 builds of version 1.0-SNAPSHOT, you can differentiate between them all. The build number is based on the revision number retrieved from scm. It only works with subversion, currently. This mojo can also check to make sure that you have checked everything into scm, before issuing the build number. That behaviour can be suppressed, and then the latest local build number is used. Build numbers are not reflected in your artifact's filename (automatically), but can be added to the metadata. You can access the build number in your pom with ${buildNumber}. You can also access ${timestamp} and the scm branch of the build (if applicable) in ${buildScmBranch} |
| buildnumber:create-timestamp | This mojo is designed to give you a timestamp available through one or more properties. Only a single timestamp is created for each execution of the mojo. This timestamp can be format into one or more strings which are then saved to properties. |
| buildnumber:help | Display help information on buildnumber-maven-plugin. Call mvn buildnumber:help -Ddetail=true -Dgoal=<goal-name>to display parameter details. |
| buildnumber:hgchangeset | Goal which sets project properties for changeSet and changeSetDate from the current Mercurial repository. |
System Requirements
The following specifies the minimum requirements to run this Maven plugin:
| Maven | 2.0.6 |
| JDK | 1.5 |
| Memory | No minimum requirement. |
| Disk Space | No minimum requirement. |
Usage
You should specify the version in your project's plugin configuration:
<project>
...
<build>
<!-- To define the plugin version in your parent POM -->
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.1-SNAPSHOT</version>
</plugin>
...
</plugins>
</pluginManagement>
<!-- To use the plugin goals in your POM or parent POM -->
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.1-SNAPSHOT</version>
</plugin>
...
</plugins>
</build>
...
</project>
For more information, see "Guide to Configuring Plug-ins"