I am trying to make a jenkins job that uses a Configuration Matrix in order to build multiple versions of my application using different maven profiles. My initial idea was to create a bunch of configurations under the guise of a profile like:
XXX,YYY,ZZZ
XXX,YYY,AAA
then as the build command use: mvn -P $profile
To get all the different builds.
Sadly this does not seem to work, Jenkins gets confused seemingly by the use of commas in the configuartion matrix. I tried seeing if url encoding worked (it got further but the actual maven command failed because it contained the url encoded version of commas which confused maven).
I realise I could put in a pointless character that is allowed and then in a script replace it with a comma, but that doesn't seem correct. There has to be a better way. Any ideas?
You can specify multiple Maven profiles without using commas with -Pprofile1 -Pprofile2
and use quotes to escape the spaces.
My configuration matrix looks like this:
The maven command is
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