The configuration passes a property to Maven using the "Additional Maven command line parameters" setting for the Maven runner.
This is done with -Darguments=''
so the maven-release-plugin
can use the arguments on each run as it forks new processes.
For one property the configuration is:
-DsomeProp=%teamcity.agent.name% -Darguments='-DimportantProp=true'
The problem is when passing multiple properties like so:
-DsomeProp=%teamcity.agent.name% -Darguments='-DimportantProp=true -DsecondProp=file_on_disk.name'
For the multiple properties configuration the Build log shows that importantProp
gets resolved as true -Dsecondprop=file_on_disk.name
which is expectedly an invalid value.
The second property secondProp
is then not applied as the string gets absorbed into the value of importantProp
.
The reason to do this is to simplify test runs on TeamCity and not to change the poms for each test. I see hardly any examples for this configuration on TeamCity.