This repository has been archived by the owner on Aug 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
BuildnumberMojo
Andreas Schmitz edited this page Jan 7, 2013
·
2 revisions
The standard build info is unfortunately missing some information which is useful to have included in artifacts. The buildnumber mojo puts the
following pieces into the jar's META-INF/deegree/buildinfo.properties
:
- build.artifactId - the module's artifactId
- build.by - the
user.name
system property's value - build.date - the date of the build (maven's
buildTimestamp
property) - build.svnrev - the scm revision number (maven's
buildNumber
property), this is usually the latest git commit id when used in conjunction with the buildnumber maven plugin
The default phase is generated-resources
.
It is recommended to use it together with the buildnumber-maven-plugin like this:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<revisionOnScmFailure>${buildTimestamp}</revisionOnScmFailure>
<getRevisionOnlyOnce>true</getRevisionOnlyOnce>
</configuration>
</plugin>
<plugin>
<groupId>org.deegree</groupId>
<artifactId>deegree-maven-plugin</artifactId>
<executions>
<execution>
<id>buildinfo</id>
<goals>
<goal>generate-buildinfo</goal>
</goals>
</execution>
</executions>
</plugin>