Fork me on GitHub

Frequently Asked Questions

Why this plugin

  1. Why not just use the default maven-release-plugin?

Building

  1. I have an aggregator pom which is separate from the parent pom. Do I declare the release plugin in the parent or the aggregator?

Source control

  1. Does the Git executable need to be installed?
  2. Where do the tags get pushed?

Why this plugin

Why not just use the default maven-release-plugin?

We found the built-in maven release plugin was falling short in the types of projects we were working on. Some specific issues:

  • Performing commits during a release leads to a messy commit history and constant merges. Being able to make multiple releases without having to pull from the remote branch is rather liberating.
  • It is too difficult to convince the built-in plugin to run tests only once.
  • The maven-release-plugin relies on Git being available on the path, so this adds an unnecessary prerequisite on machines like build agents where you may not be able to install Git. Furthermore, the built-in plugin parses shell output from Git which makes it brittle: upgrading Git could sometimes break your builds. Because the multi-module-maven-release-plugin uses a Java implementation of Git, there is no dependency on Git being installed.

Building

I have an aggregator pom which is separate from the parent pom. Do I declare the release plugin in the parent or the aggregator?
You need to declare it in both poms unfortunately. The configuration in the parent pom will be ignored so should be left blank. All configuration should go into the aggregator.

Source control

Does the Git executable need to be installed?

No. The jgit java implementation of Git is used meaning you do not need to have Git installed. This means you are free to use whichever version of Git you like without fear of compatibilty which sometimes happens with the default maven release plugin due to the way it interprets shell output of Git.


Where do the tags get pushed?

The tags get pushed to the repo in the <scm> section of your pom, or if that is not specified then they will get pushed to origin.