如何运行release:从给定的Git标签执行? [英] How to run release:perform from a given Git tag?

查看:296
本文介绍了如何运行release:从给定的Git标签执行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于Nexus临时存储库存在问题,我需要重新运行 mvn release:执行,理想情况下不需要创建新的Git标签,而是重复使用由第一次运行。



我试过了

  mvn release:perform 
-DconnectionUrl = scm:git:git@github.com:ops4j / org.ops4j.pax.exam2.git
-Dtag = exam-reactor-3.3.0

  mvn发行版:执行
-DconnectionUrl = scm:git:git@github.com:ops4j / org.ops4j.pax.exam2.git
-Dscm.tag = exam-reactor-3.3.0

但在这两种情况下,克隆都会失败,因为标记/分支参数不会转发到Git:

  [INFO] --- maven-release-plugin:2.4:perform(default-cli)@ exam-reactor --- 
[INFO] Checking执行释放项目...
[INFO]执行:/ bin / sh -c cd /home/hwellmann/work/org.ops4j.pax.exam2/target&& git clone --branch git@github.com:ops4j / org.ops4j.pax.exam2.git /home/hwellmann/work/org.ops4j.pax.exam2/target/checkout

注意: release.properties 以及由 mvn release创建的其他内容:准备不再可用。

解决方案

此问题以 SCM-729 ,目前尚未解决。与此同时,您可能会考虑一种解决方法。



最简单的方法是忘记 maven-release-plugin ;克隆,签出该标签,然后运行 mvn deploy



或者,您可以使用 release:通过手动编辑的 release.properties 文件执行。设置 scm.tag scm.url ,然后运行 release:执行


Due to issues with a Nexus staging repository, I need to re-run mvn release:perform, ideally without creating a new Git tag but reusing the one created by the first run.

I tried

mvn release:perform
-DconnectionUrl=scm:git:git@github.com:ops4j/org.ops4j.pax.exam2.git 
-Dtag=exam-reactor-3.3.0

and

mvn release:perform
-DconnectionUrl=scm:git:git@github.com:ops4j/org.ops4j.pax.exam2.git 
-Dscm.tag=exam-reactor-3.3.0

but in both cases, the clone fails because the tag/branch parameter is not forwarded to Git:

[INFO] --- maven-release-plugin:2.4:perform (default-cli) @ exam-reactor ---
[INFO] Checking out the project to perform the release ...
[INFO] Executing: /bin/sh -c cd /home/hwellmann/work/org.ops4j.pax.exam2/target && git clone --branch git@github.com:ops4j/org.ops4j.pax.exam2.git /home/hwellmann/work/org.ops4j.pax.exam2/target/checkout

Note: release.properties and other stuff created by mvn release:prepare is no longer available.

解决方案

This issue is filed as SCM-729, and currently unresolved. In the meantime, you might consider a workaround.

The simplest is to forget about maven-release-plugin; clone, check out that tag and then run mvn deploy.

Alternatively, you can use release:perform with a manually edited release.properties file. Set scm.tag and scm.url and then run release:perform.

这篇关于如何运行release:从给定的Git标签执行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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