在git-1.8.5中使用maven-release-plugin [英] Using maven-release-plugin with git-1.8.5
问题描述
mvn release:准备和 mvn发布:prepare-with-pom
失败。
mvn release:prepare
无法创建它应该创建的提交:
[maven-release-plugin]为下一个开发迭代做准备
[maven-release-plugin] prepare release foo-1.0.0
和 mvn发布:prepare-with-pom
失败,发生git错误:
[错误]无法执行目标org.apache.maven.plugins:maven-release-plugin:2.4.2:prepare-with-pom(default-cli )在项目foo上:无法从SCM
删除发行版POM [错误]提供程序消息:
[错误] git命令失败。
[错误]命令输出:
[错误]错误:以下文件在索引中进行了更改:
[错误] release-pom.xml
[错误] - 缓存保留文件,或-f强制删除)
[错误] - > [Help 1]
[错误]
解决方案这似乎已经在3月5日发布的maven-release-plugin 2.5版中得到了修复。
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]
解决方案 This appears to have been fixed in version 2.5 of maven-release-plugin, which was released on March 5th.
这篇关于在git-1.8.5中使用maven-release-plugin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!