Maven发布插件。无法标记分支

时间:2013-10-14 14:28:46

标签: svn maven maven-release-plugin

我正在使用maven release插件来标记我在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>

当我运行jenkins工作时,我收到了错误

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

1 个答案:

答案 0 :(得分:0)

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