Maven Git Release

I need to start this post by stating that I’ve only started to work seriously with Git within the last year. Unfortunately, a lot of the projects that I work on are still using SVN or CVS, but I’m now finally starting in a few that use Git.

During the last few years, I’ve done a lot of software releases using Maven Release Plugin. I still remember that I’ve took a full week just to setup the plugin in one of my projects. It worked well most of the times, but if something went wrong you could spend the next few hours fixing the problem. Oh boy, what a nightmare!

Recently, I wanted to do the same operation with a Git project and I came across with the Maven JGit-Flow Plugin and I have to tell you that this is fantastic! Very easy to setup and worked flawlessly on the first try!

You get an interactive menu to pick the version numbers you want to release, the same way as Maven Release Plugin. I’m developing on the master branch, but during this process a release branch is created with the release versions and development branch with the new development versions.

Now the cool thing about this, is that everything is still in your local environment! If you are not happy with the changes, you can get rid of the branches and start over. No build was performed at this point.

In this step, the release branch is going to get merged as described in A successful Git branching model and create the tag. Remember, nothing has been pushed yet, so you can always revert the process.

I’m not sure if that’s possible. It kinda defeats the all git-flow concept, but maybe you can do it by playing with flowInitContext configuration and pointing developmentBranchName to the master branch.

The plugin works. I’ve used it today. It seems that your issue might be related with something else. Do you have a stacktrace? I’m able to see and download that file. Maybe you are behind a proxy or firewall that is blocking you?

by using jgitver-maven-plugin you could also not pollute your git history with fake commits to update the poms version (exactly like maven-release-plugin also does 🙁 ).
Using it a releases could imply be realized using: git tag -a X.Y.Z && mvn deploy