【发布时间】:2013-12-21 06:32:44
【问题描述】:
我在 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>
适合我的是:
标签基地
<tagBase>svn://svn.XXXX.local/qa/XX-tf/tags/</tagBase>
单片机连接
<scm>
<connection>scm:svn:svn://svn.XXXX.local/qa/XX-tf/trunk/env-status-checks</connection>
</scm>
【问题讨论】:
-
所以我尝试了
scm:svn://svn.XXXX.local/qa/XX-tf/trunk/env-status-checks scm:svn:svn.XXXX.local/qa/XX-tf/trunk/env-status-checks</connection> 没有任何效果。scm:svn:svn.XXXX.local/qa/XX-tf/trunk/env-status-checks</connection> -
从等式中删除 maven。自行运行该 SVN 命令并确认它为什么不起作用。一旦你在 svn 中修复它,再次引入 maven,看看你需要给它什么,以便它产生工作的 SVN 命令
标签: maven svn maven-3 maven-release-plugin