0

我正在使用 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 设置正确。很乐意得到帮助。

4

1 回答 1

0

命令行以以下内容结尾:scm:svn:http://<svn_ip>:8080/repos/DMC/MyProject/tags/rel-99346. 错了:svn.exe 不理解 scm: 前缀,这让 Maven 理解这是什么类型的字符串。我看不出这个值来自哪里,也许你可以自己解释一下。顺便说一句,<scm><url>没有 scm: 前缀,它指向一个 webURL

于 2013-10-14T17:36:35.987 回答