Search code examples
javagitmavenpom.xmlmaven-release-plugin

Maven: Release Plugin Does Not Commit Updated Versions


I am using the Maven release plugin. When I run

mvn release:prepare

I am prompted with the usual about the versions

What is the release version for "FOO"? (foo:bar) 1.10.99999:
What is the new development version for "FOO"? (foo:bar) 1.10.100000-SNAPSHOT:

The process completes normally. A tag is created and pushed to the correct repository as specified in the SCM tag:

<scm>
    <connection>scm:git:[email protected]:foo/bar.git</connection>
    <tag>HEAD</tag>
</scm>

But the updates to the versions numbers are not committed, and thus the SNAPSHOT, in the case the 1.10.99999-SNAPSHOT is deployed on mvn deploy. It appears others have had this issue as well but no real answer has been found

What is happening here and how do I fix it?

This is on Mac OSX. My Maven version is as follows:

$ brew info maven
  maven: stable 3.2.5
  http://maven.apache.org/
  /usr/local/Cellar/maven/3.2.3 (76 files, 8.0M) *
  Built from source
  From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/maven.rb

$ mvn --version
    Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-11T13:58:10-07:00)
    Maven home: /usr/local/Cellar/maven/3.2.3/libexec
    Java version: 1.7.0_67, vendor: Oracle Corporation
    Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/jre
    Default locale: en_US, platform encoding: UTF-8

OS name: "mac os x", version: "10.10.1", arch: "x86_64", family: "mac"


Solution

  • In general: when facing issues with a specific maven-plugin, verify if you are using the latest version and try to upgrade first.