Get git-commit-id-plugin working with heroku

Spring boot offers out-of-the-box support for git-commit-id-plugin, where you can bind git properties to Spring variables. However heroku cannot work with this. After some reading up, it appears that the hidden .gitsubfolder is not pushed to heroku. Since during build time the git.propertiesfile is generated and saved in the target folder, the git-commit-id-plugin will fail as there is no .gitsubfolder. Then I stumbled on the heroku-maven-plugin. This plugin allows to build your project locally and then push the artifact to heroku - and that’s what I need....

August 9, 2020 · 1 min