Using maven-exec-plugin to store the current git sha in a build

The current version of the maven buildnumber plugin does not yet support the git scm backend. This makes it harder to get the git sha for the current build (often a snapshot build) into the MANIFEST.MF file.

However - if all you need is a file somewhere in the deployed artifact that contains the sha then this workaround may help until the git scm is supported by buildnumber:


This will put a file in the artifact containing the sha. You will need git in your path for this to work.