Maven Release Plugin将标签推向错误的回购

时间:2013-07-20 20:08:56

标签: java git maven version-control maven-release-plugin

我正在尝试执行一个mvn版本:准备我的项目并运行到最后它尝试提交标记然后失败:

[INFO] Tagging release with the label v1.8.0...
[INFO] Executing: /bin/sh -c cd /Users/terraframe/Documents/workspace/Runway-SDK && git tag -F /var/folders/tY/tY5PnSNPED0Yr7FtapST2++++TI/-Tmp-/maven-scm-864030210.commit v1.8.0
[INFO] Working directory: /Users/terraframe/Documents/workspace/Runway-SDK
[INFO] Executing: /bin/sh -c cd /Users/terraframe/Documents/workspace/Runway-SDK && git push ssh://git@github.com/terraframe v1.8.0

...

Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.4.1:prepare (default-cli) on project runwaysdk-main: Unable to tag SCM
[ERROR] Provider message:
[ERROR] The git-push command failed.
[ERROR] Command output:
[ERROR] ERROR: Repository not found.
[ERROR] fatal: The remote end hung up unexpectedly

失败的特定git命令是:

git push ssh://git@github.com/terraframe v1.8.0

这是我在runwaysdk-main pom中的scm定义:

<scm>
    <connection>scm:git:ssh://git@github.com/terraframe/Runway-SDK.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/terraframe/Runway-SDK.git</developerConnection>
    <url>scm:git:ssh://git@github.com/terraframe/Runway-SDK.git</url>
</scm>

tldr:我的repo网址定义为scm:git:ssh://git@github.com/terraframe/Runway-SDK.git 然而,这个git push命令试图推送到ssh://git@github.com/terraframe

为什么呢?我该如何解决?

修改

我在具有扁平项目结构的多模块的父pom(runwaysdk-main)上执行此操作:

github.com/terraframe/Runway-SDK
  /runwaysdk-main
  /runwaysdk-common
  /runwaysdk-client
  /runwaysdk-server

我使用的是最新版本的maven-release-plugin,2.4.1。

1 个答案:

答案 0 :(得分:2)

我认为你正在点击https://issues.apache.org/jira/browse/SCM-709。作为解决方法,您可以使用maven-release-plugin的版本2.3.2