versions icon indicating copy to clipboard operation
versions copied to clipboard

Support multiple properties in 'set-property'

Open Dennis-Koch opened this issue 6 years ago • 1 comments

Current only a single property is supported by the SetPropertyMojo. In cases where you have multiple distinct properties which shall be assigned the same "newVersion" you can't do this via plain command line any more.

In my company we currently exactly this problem on the command line:

mvn versions:set versions:set-property versions:update-child-modules org.eclipse.tycho:tycho-versions-plugin:update-eclipse-metadata -DnewVersion=%NEW_VERSION% -Dproperty=myProperty1,myProperty2 -DgenerateBackupPoms=false -DprocessAllModules -Dtycho.mode=maven

For different reasons we MUST execute all these mojos - including tycho versioning - in one call to one multi-module build. But the parameter "myProperty1,myProperty2" is interpreted as a single parameter even though it is in the pom.xml impossible to have a "comma" within a key/value property declaration.

I have uploaded a fixed version of the SetPropertyMojo because I was for whatever reason not able to create a PR

Dennis-Koch avatar May 25 '18 09:05 Dennis-Koch

I'm not sure if I understand your issue in the right way but the documentation of goal set-property says it is possible to "...specify multiple property names separated by "," which are all set to the same new version."

easterwood avatar Apr 28 '22 07:04 easterwood

I think this has been resolved by #546 and can be closed.

jarmoniuk avatar Sep 01 '22 05:09 jarmoniuk

It's verified to be resolved by that PR, there's even an it testing this very feature.

jarmoniuk avatar Sep 02 '22 15:09 jarmoniuk

is there any option to set multiple versions for multiple properties?

indrakumaryadav avatar Jun 08 '23 08:06 indrakumaryadav