Created
May 22, 2013 15:45
-
-
Save holyjak/5628612 to your computer and use it in GitHub Desktop.
Pom setup to include git/svn/mercurial revision in the generated MANIFEST.MF file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project> | |
<build> | |
<plugins> | |
<plugin> | |
<!-- Create the property $buildNumber holding the current Git revision --> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>buildnumber-maven-plugin</artifactId> | |
<version>1.2</version> | |
<executions> | |
<execution> | |
<phase>validate</phase> | |
<goals> | |
<goal>create</goal> | |
</goals> | |
</execution> | |
</executions> | |
<configuration> | |
<doCheck>false</doCheck> | |
<doUpdate>false</doUpdate> | |
</configuration> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-jar-plugin</artifactId> | |
<version>2.4</version> | |
<configuration> | |
<archive> | |
<manifestEntries> | |
<Implementation-Title>${project.name}</Implementation-Title> | |
<!-- buildNumber is produced at runtime by buildnumber-maven-plugin --> | |
<Implementation-Version>${project.version} ${buildNumber}</Implementation-Version> | |
</manifestEntries> | |
</archive> | |
</configuration> | |
</plugin> | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment