Created
December 23, 2015 12:40
-
-
Save britter/54178dce353f2a8320c8 to your computer and use it in GitHub Desktop.
Extracting a git commit hash using the buildnumber-maven-plugin in conjunction with resource filtering
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
<scm> | |
<url>https://github.com/britter/spring-boot-heroku-demo</url> | |
</scm> | |
<build> | |
<resources> | |
<resource> | |
<directory>src/main/resources</directory> | |
<filtering>true</filtering> | |
<includes> | |
<include>messages.properties</include> | |
</includes> | |
</resource> | |
<resource> | |
<directory>src/main/resources</directory> | |
<filtering>false</filtering> | |
<excludes> | |
<exclude>messages.properties</exclude> | |
</excludes> | |
</resource> | |
</resources> | |
<plugins> | |
<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> | |
</plugin> | |
</plugins> | |
</build> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment