error message:
When using git-1.8.5, with maven-release-plugin (tested with versions 2.4.2 and 2.3.2) with mvn (tested with versions 3.1.1 and 3.0.5), running mvn release:prepare and mvn release:prepare-with-pom fails.
mvn release:prepare fails to create the commits that it's supposed to create:[maven-release-plugin] prepare for next development iteration
[maven-release-plugin] prepare release foo-1.0.0
and mvn release:prepare-with-pom fails with a git error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.4.2:prepare-with-pom (default-cli) on project foo: Cannot remove release POMs from SCM
[ERROR] Provider message:
[ERROR] The git command failed.
[ERROR] Command output:
[ERROR] error: the following file has changes staged in the index:
[ERROR] release-pom.xml
[ERROR] (use --cached to keep the file, or -f to force removal)
[ERROR] -> [Help 1]
[ERROR]
solution:
This appears to have been fixed in version 2.5 of maven-release-plugin, which was released on March 5th.
link:
http://stackoverflow.com/questions/20912299/using-maven-release-plugin-with-git-1-8-5