Set the filename format of the artifacts in the jenkins-releases profile. Add also the git commit number to the MANIFEST inside the distributed jar.

This commit is contained in:
Manuele Simi 2019-06-11 14:36:55 -04:00
parent e87e8b7c96
commit 7a13a64fb1
1 changed files with 35 additions and 0 deletions

35
pom.xml
View File

@ -198,6 +198,41 @@
<url>${repository.releases.readwrite}</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<id>useLastCommittedRevision</id>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<shortRevisionLength>5</shortRevisionLength>
<doCheck>false</doCheck>
<doUpdate>false</doUpdate>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<SCM-Revision>${buildNumber}</SCM-Revision>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
<finalName>${project.artifactId}-${project.version}-${buildNumber}</finalName>
</build>
</profile>
<profile>