Permalink
Browse files

added build number generation Maven plugin. Fixes #30

  • Loading branch information...
PiotrNowicki committed Oct 13, 2012
1 parent 25a900b commit 8528e4d096c97e7dc000220a0479c9a93b009faf
Showing with 47 additions and 0 deletions.
  1. +3 −0 buildNumber.properties
  2. +43 −0 pom.xml
  3. +1 −0 src/main/resources/application.properties
View
@@ -0,0 +1,3 @@
#maven.buildNumber.plugin properties file
#Sun Oct 14 01:31:29 CEST 2012
buildNumber=2
View
43 pom.xml
@@ -10,6 +10,11 @@
<name>Exam Simulator</name>
<description>Exam Simulator for the Oracle Certified Expert Web Component Developer</description>
<scm>
<url>scm:git:git://github.com/PiotrNowicki</url>
<developerConnection>scm:git:git://github.com/PiotrNowicki</developerConnection>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jboss.bom.version>1.0.0.Final</jboss.bom.version>
@@ -110,6 +115,20 @@
<build>
<finalName>${project.artifactId}</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>application.properties</include>
</includes>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
@@ -138,6 +157,30 @@
</excludes>
</configuration>
</plugin>
<!-- Save revision number for future access. -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doCheck>true</doCheck>
<doUpdate>false</doUpdate>
<shortRevisionLength>4</shortRevisionLength>
<format>{0,date,yyyy-MM-dd HH:mm:ss}</format>
<items>
<item>timestamp</item>
</items>
</configuration>
</plugin>
</plugins>
</build>
@@ -0,0 +1 @@
app.version=${version} r${buildNumber}

0 comments on commit 8528e4d

Please sign in to comment.