Created
July 5, 2012 13:22
-
-
Save nemoo/3053611 to your computer and use it in GitHub Desktop.
using mavanagaiata to write git sha1 to manifest.fm
This file contains hidden or 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
// these are fragments of my maven pom that extract the sha1 hash from my git repo and write it to manifest file in the created war. | |
. | |
. | |
. | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-war-plugin</artifactId> | |
<version>2.1.1</version> | |
<configuration> | |
<archive> | |
<manifestEntries> | |
<version>${project.version}</version> | |
<sha1>${mavanagaiata.commit.sha}</sha1> | |
<buildTimestamp>${maven.build.timestamp}</buildTimestamp> | |
</manifestEntries> | |
</archive> | |
</configuration> | |
</plugin> | |
. | |
. | |
. | |
<plugin> | |
<groupId>com.github.koraktor</groupId> | |
<artifactId>mavanagaiata</artifactId> | |
<version>0.3.2</version> | |
<executions> | |
<execution> | |
<id>load-git-branch</id> | |
<goals> | |
<goal>commit</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
. | |
. | |
. |
thanks!
Works now, updated the gist.
Good. Additionally you should remove the <dependency>
on Mavanagaiata, it's only a plugin, you probably don't want it to be copied into your WAR, JAR or whatever.
ok, great, works. updated the gist.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The property
${mavanagaiata.sha}
does not exist, try${mavanagaiata.commit.sha}
.