Can I pass the values of the parameter of scm for Jenkins?
in my pom.xml, I have the values set as default:
<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>
The problem is when I running with another branch and want to run a release by jenkins (within the release process, it generate the tag of the project) it always will get the value that is defined in pom.
I would passing a new path in a especific parameter at Jenkins that automatically will be set in scm pom project.
I did some tests by setting a string parameter in a parameterized building but he did not recognize the given parameters and error in construction.
Another way was to pass through the "release goals and options":
-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
The error persisted ...
Caused by: org.apache.maven.shared.release.ReleaseFailureException:
Missing required setting: scm connection or developerConnection must be specified.
Is there a way to do this so that I can tell by Jenkins?
I noticed the properties defined for the SCM connections are not correct. The property for setting the SCM connection on the command line is -Dproject.scm.connection
and developer connection is -Dproject.scm.developerConnection
.
According to MRELEASE-707 the properties connection
and developerConnection
are read only and cannot be set directly. You have to define your own property for the url and use it as placeholder (see: How to override maven property in command line?).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With