通过jenkins的参数传递scm标记值

ric*_*rdo 8 hudson maven jenkins

我可以为Jenkins传递scm参数的值吗?

在我的pom.xml中,我将值设置为默认值:

<scm>
     <connection> scm:svn:https://172.10.10.30/svn/repPortal/branches/2012/Branch_A/ </ connection>
     <developerConnection>scm:svn:https://172.10.10.30/svn/repPortal/branches/2012/Branch_A/</developerConnection>
</ scm>
Run Code Online (Sandbox Code Playgroud)

问题是当我与另一个分支运行并希望由jenkins运行发布时(在发布过程中,它生成项目的标记)它总是会获得在pom中定义的值.

我会在Jenkins的特定参数中传递一条新路径,该路径将自动设置在scm pom项目中.

我通过在参数化建筑物中设置字符串参数进行了一些测试,但他没有识别给定的参数和构造中的错误.

另一种方法是通过"发布目标和选项":

-X -Dresume=false release:clean release:prepare release:perform \
    -DscmConnection="scm:svn:https://172.10.10.30/svn/repPortal/branches/2012/Branch_B"-DscmDeveloperConnection = "scm: svn: https :/ / 172.10.10.30/svn/repPortal/branches/2012/Branch_B "scm: validate
Run Code Online (Sandbox Code Playgroud)

错误仍然存​​在......

Caused by: org.apache.maven.shared.release.ReleaseFailureException:
    Missing required setting: scm connection or developerConnection must be specified.
Run Code Online (Sandbox Code Playgroud)

有没有办法做到这一点,我可以告诉詹金斯?

use*_*849 1

我注意到为 SCM 连接定义的属性不正确。命令行设置SCM连接的属性为-Dproject.scm.connection,开发者连接为-Dproject.scm.developerConnection