Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven automate versioning and changelog generation

I want to automate version and changelog creation from Git commits. So it's basically the same thing as npm standard-version but it's for Maven. So how can I achieve the versioning automatically?

additional information: I want to increase the version at POM file using the Git Commit-lint messages. In npm if you commit features it increases MINOR, and if you commit fix it increases PATCH version automatically at Semantic Versioning and creates a changelog for these changes. I was wondering if there is a similar way for Maven?

like image 462
Eray Tufan Avatar asked Dec 20 '25 23:12

Eray Tufan


1 Answers

I couldn't find a direct way for Maven. However, you can still use standard-version to create the changelog and bump up the version. You have to write a script to make package.json and Maven versions same. I used the Versions Maven Plugin to accomplish it.

mvn versions:set -DnewVersion=%npm_package_version% && mvn versions:commit
like image 58
Eray Tufan Avatar answered Dec 23 '25 08:12

Eray Tufan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!