Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfriedenhagen/565626 to your computer and use it in GitHub Desktop.
Save mfriedenhagen/565626 to your computer and use it in GitHub Desktop.
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<phase>validate</phase>
<configuration>
<tasks>
<exec
executable="git"
outputproperty="GITHASH">
<arg
value="rev-parse" />
<arg
value="HEAD" />
</exec>
<echoxml file="res/values/githash.xml">
<resources>
<string
name="info_githash">${GITHASH}</string>
</resources>
</echoxml>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment