Maven Buildnumber plugin - Git

Walter White picture Walter White · Apr 21, 2010 · Viewed 23.6k times · Source

The Maven Buildnumber plugin doesn't appear to work with GIT yet. Is there a workaround for the time being? I recently switched from SVN to GIT and have found it to be an easy transition, but this is the only thing that I don't have working presently.

Walter

Answer

young.fu.panda picture young.fu.panda · Nov 3, 2012

I use this Maven plugin:

https://github.com/ktoso/maven-git-commit-id-plugin

and have it filter values directly into my spring files where I can inject them into anything I want (mostly just for reporting versions at start-up / or via a REST service).

When first starting, set it up to generate the properties file so you can see everything that is available. Extremely easy to use. Love it.