由于 Nexus 临时存储库的问题,我需要重新运行 mvn release:perform
,最好不要创建新的 Git 标签,而是重新使用第一次运行时创建的标签。
我试过了
mvn release:perform
-DconnectionUrl=scm:git:git@github.com:ops4j/org.ops4j.pax.exam2.git
-Dtag=exam-reactor-3.3.0
和
mvn release:perform
-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 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
注意:release.properties
和由 mvn release:prepare
创建的其他内容不再可用。
最佳答案
此问题归档为 SCM-729 , 目前未解决。与此同时,您可能会考虑一个变通办法。
最简单的就是忘记maven-release-plugin
;克隆,检查该标记,然后运行 mvn deploy
。
或者,您可以将 release:perform
与手动编辑的 release.properties
文件一起使用。设置scm.tag
和scm.url
,然后运行release:perform
。
关于git - 如何运行版本 :perform from a given Git tag?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18943347/