在git-1.8.5中使用maven-release-plugin [英] Using maven-release-plugin with git-1.8.5

查看:571
本文介绍了在git-1.8.5中使用maven-release-plugin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用mvn(使用版本3.1.1和3.0.5测试)使用git-1.8.5,使用maven-release-plugin(使用版本2.4.2和2.3.2进行测试),运行 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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆