How to generate build no with SVN revision no & Maven buildNumber plugin.
- by Binit jha
Hi,
I am using mvn buildNumber plugin to generate build no with latest svn revision no. But, our version is not resolve to ${buildNumber} in the duration of installing in .m2 local reposotry.
here is the our pom details:
<modelVersion>4.0.0</modelVersion>
<groupId>com.hp.cloudprint</groupId>
<artifactId>testutils</artifactId>
<name>testutils</name>
<version>6.3.rel.${buildNumber}</version>
<description>This jar contains some helper classes which can simplify the writing of JUnit test cases.</description>
<dependencies>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<executions>
<execution>
<id>useLastCommittedRevision</id>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doCheck>false</doCheck>
<doUpdate>true</doUpdate>
<getRevisionOnlyOnce>true</getRevisionOnlyOnce>
</configuration>
</plugin>
<scm>
<connection>scm:svn:https://acn-platform</connection>
<developerConnection>scm:svn:https://abc-platform/trunk</developerConnection>
</scm>.
</project>
Building jar: C:\Documents and Settings\hpadmin\workspace\testutils\target\testutils-6.3.rel.2930.jar
[INFO] [install:install]
[INFO] Installing C:\Documents and Settings\hpadmin\workspace\testutils\target\testutils-6.3.rel.2930.jar to C:\Documents and Settings\jhab.m2*\repository\com\hp\cloudprint\testutils\6.3.rel.${buildNumber}\testutils-6.3.rel.${buildNumber}.jar**
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
Target generated correct jar. testutil-6.3.rel.2297.jar*
Thanks in advance
Binit