我正在使用 Maven 发布插件来在 SVN 中标记我的项目。我以以下 Maven 目标运行 Jenkins 工作:
-Pmake-tag release:clean release:prepare -sbuild/deploy-settings.xml -Dresume=false
我的 pom.xml
<profile>
<id>make-tag</id>
<modules>
<module>../common-core</module>
<module>../htdocs</module>
<module>../deployer</module>
<module>../configuration</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.4</version>
<configuration>
<preparationGoals>validate</preparationGoals>
<!-- <tagBase>svn:http://172.16.71.2:8080/repos/DMC/Copyright2/tags/</tagBase> -->
<useEditMode>true</useEditMode>
<autoVersionSubmodules>true</autoVersionSubmodules>
<updateWorkingCopyVersions>false</updateWorkingCopyVersions>
<tagNameFormat>rel-${env.REL_TAG}</tagNameFormat>
<username>${env.SCM_USER}</username>
<password>${env.SCM_PASSWD}</password>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<build>
...
<scm>
<developerConnection>scm:svn:http://<svn_ip>:8080/repos/DMC/Copyright2</developerConnection>
<connection>scm:svn:http://<svn_ip>:8080/repos/DMC/Copyright2</connection>
<url>scm:svn:http://<svn_ip>:8080/repos/DMC/Copyright2</url>
</scm>
</build>
当我运行詹金斯工作时出现错误
[INFO] Executing: cmd.exe /X /C "svn --username jenkins --password ***** --no-auth-cache --non-interactive copy --file C:\Windows\TEMP\maven-scm-756812364.commit --revision 51859 http://<svn_ip>:8080/repos/DMC scm:svn:http://<svn_ip>:8080/repos/DMC/MyProject/tags/rel-99346"
[INFO] Working directory: C:\Program Files (x86)\Jenkins\jobs\MyJob\workspace
[JENKINS] Archiving disabled
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Unable to tag SCM
Provider message:
The svn tag command failed.
Command output:
svn: E020024: Error resolving case of 'scm:svn:http:\\<svn_ip>:8080\repos\DMC\MyProject\tags\rel-99346'
尽管日志输出中的所有斜杠都是 \ 在 pom.xml url 设置正确。很乐意得到帮助。