I am using maven-surefire-plugin
+ Sonar
together and I would like to add some extra value to argLine
parameter of the maven-surefire-plugin.
So I did it:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20.1</version>
<configuration>
<argLine>-DCRR.Webservice.isSimulated=true -D...</argLine>
</configuration>
</plugin>
...
</plugins>
</build>
But in this case I am overwriting the original value of the argLine
parameter and Sonar does not generate jacoco.exec file.
I can see in the maven debug log (-X) that the value of argLine param without overwriting its value is -javaagent:/opt/jenkins/.../myproject-SONAR/.repository/org/jacoco/org.jacoco.agent/0.7.4.201502262128/org.jacoco.agent-0.7.4.201502262128-runtime.jar=destfile=/opt/jenkins/.../myproject-SONAR/target/jacoco.exec
.
What is the proper way to APPEND the original value of this parameter (keep the original + add extra values)?
I am using Apache Maven 3.5.0, Java version: 1.8.0_131, vendor: Oracle Corporation.