Skip to content

Instantly share code, notes, and snippets.

@mvpotter
Created January 17, 2014 07:51
Show Gist options
  • Save mvpotter/8469817 to your computer and use it in GitHub Desktop.
Save mvpotter/8469817 to your computer and use it in GitHub Desktop.
Get revision number for module using maven
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<configuration>
<buildNumberPropertyName>buildRevision</buildNumberPropertyName>
<timestampPropertyName>buildTimestamp</timestampPropertyName>
<revisionOnScmFailure>unavailable</revisionOnScmFailure>
<useLastCommittedRevision>true</useLastCommittedRevision>
<doUpdate>true</doUpdate>
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment