I\'ve a Java project using Spring Framework and Git and I wanted to display a build number. I found the Build Number Maven plugin. With Git the build number is a Git hash. I
You shouldn't set revisionOnScmFailure
option to true
, it doesn't expect a boolean. Set it to revision string you want to use when SCM is unavailable, like na
or like that. It doesn't matter for your case since you override the build number format but it would be more correct.
See buildnumber-maven-plugin docs.