Maven Release Plugin for Github

Maven Release Plugin for Github Projects

I always forget to update the version of software in the pom.xml file when performing a release so, after someone suggested we sort this out, I looked into how to setup the maven release plugin for github.

I could not find clear, example based, documentation, hence this post.

Step 1 - SSH Keys

It will be far easier to use github over SSH with the release plugin.

You will need to follow this guide to Connecting to GitHub with SSH.

Step 2 - SCM Details

There is a SCM tag in the pom.xml which will need to look something like:


Step 3 - Maven Release Plugin

Add the release plugin to your pom.xml file:


Step 4- Profit (aka automatically release new version)

Run mvn release:prepare and follow the prompts.

For more information see the maven release plugin docs.

As always, if you have any comments please contact me.