截断Maven发布标签推送的SCM(git)URL [英] Truncating SCM (git) URL for maven release tag push

查看:135
本文介绍了截断Maven发布标签推送的SCM(git)URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于某种原因,在运行maven发布时,它只是为推送的标记部分提供了一个无效的URL。对于pom.xml提交/推送,它可以正常工作并转到相应的URL。见下面:

For some reason, when running maven release, it is giving me an invalid URL just for the tagging part of the push. For the pom.xml commit/push, it works fine and goes to appropriate URL. See below:

[INFO] Working directory: /opt/jenkins-home/jobs/Section 4362/workspace/section4362-parent
[INFO] Executing: /bin/sh -c cd "/opt/jenkins-home/jobs/Section 4362/workspace/section4362-parent" && git commit --verbose -F /tmp/maven-scm-217365030.commit '/opt/jenkins-home/jobs/Section 4362/workspace/section4362-services/pom.xml' '/opt/jenkins-home/jobs/Section 4362/workspace/section4362-webapp/pom.xml' '/opt/jenkins-home/jobs/Section 4362/workspace/section4362-static/pom.xml' pom.xml
[INFO] Working directory: /opt/jenkins-home/jobs/Section 4362/workspace/section4362-parent
[INFO] Executing: /bin/sh -c cd "/opt/jenkins-home/jobs/Section 4362/workspace/section4362-parent" && git symbolic-ref HEAD
[INFO] Working directory: /opt/jenkins-home/jobs/Section 4362/workspace/section4362-parent
[INFO] Executing: /bin/sh -c cd "/opt/jenkins-home/jobs/Section 4362/workspace/section4362-parent" && git push ssh://git@github.com/{org}/Section4362.git maven-release-test:maven-release-test
[INFO] Working directory: /opt/jenkins-home/jobs/Section 4362/workspace/section4362-parent
[INFO] Tagging release with the label section4362-parent-0.3...
[INFO] Executing: /bin/sh -c cd "/opt/jenkins-home/jobs/Section 4362/workspace" && git tag -F /tmp/maven-scm-882610155.commit section4362-parent-0.3
[INFO] Working directory: /opt/jenkins-home/jobs/Section 4362/workspace
[INFO] Executing: /bin/sh -c cd "/opt/jenkins-home/jobs/Section 4362/workspace" && git push ssh://git@github.com/{org} section4362-parent-0.3
[INFO] Working directory: /opt/jenkins-home/jobs/Section 4362/workspace

您可以看到,对于提交之后的推送,它会推送到 ssh:// git @ github。 com / {org} /Section4362.git ({org}由我擦掉),而对于标签之后的推送,它会转到 ssh:// git @ github。 com / {org} - 网址应该在最后包含 /Section4362.git 。我所有的pom文件都指定了正确的: scm:git:ssh://git@github.com/ {org} /Section4362.git

You can see that for the push after the commit, it pushes to ssh://git@github.com/{org}/Section4362.git ({org} scrubbed by me), whereas for the push after the tag, it goes to ssh://git@github.com/{org} – URL should include /Section4362.git at the end. All my pom files specify the correct: scm:git:ssh://git@github.com/{org}/Section4362.git

如何改变标签推送的URL以及从哪里获取?在这一步中,Build显然失败,说无法连接到repo。

How would URL be changing for tag push and where would it get it from? Build is obviously failing at that step saying unable to connect to repo.

推荐答案

maven-release-plugin中存在一个未解决的问题为了让事情顺利进行,必须对此进行修复。有关详情,请参见 http://jira.codehaus.org/browse/MRELEASE-767 。 。不幸的是,直到git网址翻译中的错误得到解决,除了不对git进行更改外,没有太多的工作可做。

There is an open issue in maven-release-plugin which has to be fixed in order to get things working. See http://jira.codehaus.org/browse/MRELEASE-767 for more details. Unfortunately, until the bug in git URL translation is resolved, not much can be done besides not pushing the changes to git.

这篇关于截断Maven发布标签推送的SCM(git)URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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