Maven Release Plugin - svn:E200007:源和目标URL似乎不指向同一个存储库

时间:2013-12-04 16:42:12

标签: maven svn maven-3 maven-release-plugin

我在mvn版本中遇到此错误:准备目标:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.4.2:prepare (default-cli) on project env-status-checks: Unable to tag SCM
[ERROR] Provider message:
[ERROR] The svn tag command failed.
[ERROR] Command output:
[ERROR] svn: E200007: Source and destination URLs appear not to point to the same repository.

这是失败的SVN命令

[INFO] Tagging release with the label env-status-checks-0.0.1...
[INFO] Executing: cmd.exe /X /C "svn --username akanchev --password ***** --no-auth-cache --non-interactive copy --file C:\Windows\TEMP\maven-scm-1102804858.commit --revision 9260 svn://svn.XXXX.local/qa/XX-tf/trunk/env-status-checks http://svn.XXXX.local/qa/XX-tf/tags/env-status-checks-0.0.1"
[INFO] Working directory: C:\Users\Administrator\.jenkins\jobs\Test release\workspace

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

maven发布插件的pom.xml配置为:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-release-plugin</artifactId>
    <version>2.4.2</version>
       <configuration>
          <tagBase>http://svn.XXXX.local/qa/XX-tf/tags</tagBase>
       </configuration>
</plugin>

这就是SVN scm:

<scm>
    <connection>scm:svn:svn://svn.XXX.local/qa/wh-tf/trunk/env-status-checks</connection>
    <developerConnection>scm:svn:svn://svn.XXX.local/qa/XX-tf/trunk/env-status-checks</developerConnection>
    <url>scm:svn:svn://svn.XXX.local/qa/XX-tf/</url>        
</scm>

最终解决方案(感谢Ben):

我实际上被发布插件的maven指南所迷惑。在这个例子中

<tagBase>https://svn.mycompany.com/repos/myapplication/releases</tagBase>

适合我的是:

TAG base

<tagBase>svn://svn.XXXX.local/qa/XX-tf/tags/</tagBase>

SCM连接

<scm>
  <connection>scm:svn:svn://svn.XXXX.local/qa/XX-tf/trunk/env-status-checks</connection>
 </scm>

1 个答案:

答案 0 :(得分:8)

你的svn copy命令混合了两种不同的协议。源是svn://,目的地是http://。在执行服务器端复制时,您需要使用相同的协议,因为目标和源必须通过相同的连接可访问。

通过http://切换到同时使用svn://或两者都可以解决您的问题。

相关问题