【发布时间】:2017-03-03 18:37:53
【问题描述】:
由于某种原因,在运行 maven 版本时,它给了我一个无效的 URL,仅用于推送的标记部分。对于 pom.xml 提交/推送,它工作正常并转到适当的 URL。见下文:
[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} - URL 应该包含 /Section4362.git在最后。我所有的 pom 文件都指定了正确的:scm:git:ssh://git@github.com/{org}/Section4362.git
标签推送的 URL 将如何变化?它从哪里获取?构建显然在这一步失败,说无法连接到 repo。
【问题讨论】:
标签: git maven maven-release-plugin