Include git commit hash in jar version
One way to achieve this is to use the git-commit-id-plugin. Add this to the list of plugins in the build section of your pom.xml: <plugin> <groupId>pl.project13.maven</groupId> <artifactId>git-commit-id-plugin</artifactId> <version>${git-commit-id-plugin.version}</version> <executions> <execution> <id>get-the-git-infos</id> <goals> <goal>revision</goal> </goals> <phase>validate</phase> </execution> </executions> <configuration> <dotGitDirectory>${project.basedir}/.git</dotGitDirectory> </configuration> </plugin> Note, that I’ve changed the phase to validate, so the revision number property is … Read more