Using maven-release-plugin with git-1.8.5-- commit error

使用Maven Release Plugin版本2.4.2和2.3.2时,在Git 1.8.5环境下运行mvn release:prepare或mvn release:prepare-with-pom会遇到问题。主要问题是无法从SCM移除发布POM文件,导致流程失败。此问题已在Maven Release Plugin 2.5版本中得到修复。

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


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值