[VIVO-1222] Add revisionInfo to build

This commit is contained in:
Graham Triggs 2016-05-23 15:11:33 +01:00
parent 4dfffe88a2
commit 4e7802d34c
3 changed files with 44 additions and 0 deletions

36
pom.xml
View file

@ -14,6 +14,8 @@
<vitro-core>../Vitro</vitro-core> <vitro-core>../Vitro</vitro-core>
<vitro-version>${project.version}</vitro-version> <vitro-version>${project.version}</vitro-version>
<vivo-dir>${basedir}</vivo-dir> <vivo-dir>${basedir}</vivo-dir>
<maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>
<build.timestamp>${maven.build.timestamp}</build.timestamp>
</properties> </properties>
<name>VIVO</name> <name>VIVO</name>
@ -113,9 +115,31 @@
<target>1.7</target> <target>1.7</target>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doCheck>false</doCheck>
<doUpdate>false</doUpdate>
<shortRevisionLength>7</shortRevisionLength>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>
<!--
Add a custom repository, which is actually just a simple GitHub project
in order to distribute some dependencies that aren't part of Maven central
-->
<repositories> <repositories>
<repository> <repository>
<id>vivo-dependencies</id> <id>vivo-dependencies</id>
@ -123,4 +147,16 @@
<url>https://raw.github.com/vivo-project/dependencies/master/</url> <url>https://raw.github.com/vivo-project/dependencies/master/</url>
</repository> </repository>
</repositories> </repositories>
<!--
The SCM repository location is used by Continuum to update against
when changes have occurred. This spawns a new build cycle and releases
snapshots into the snapshot repository below.
-->
<scm>
<connection>scm:git:git@github.com:vivo-project/VIVO.git</connection>
<developerConnection>scm:git:git@github.com:vivo-project/VIVO.git</developerConnection>
<url>git@github.com:vivo-project/VIVO.git</url>
<tag>HEAD</tag>
</scm>
</project> </project>

View file

@ -40,6 +40,12 @@
<type>war</type> <type>war</type>
</overlay> </overlay>
</overlays> </overlays>
<webResources>
<resource>
<directory>src/main/webResources</directory>
<filtering>true</filtering>
</resource>
</webResources>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>

View file

@ -0,0 +1,2 @@
${build.timestamp}
VIVO ~ ${project.version} ~ ${buildNumber}