I am using maven with the jacoco plugin to generate code coverage metrics. I am having some difficulty in configuring the surefire plugin with the java opt
For me upgrading the version from 0.7.7.201606060606 to 0.7.9 also fixed this.
I had to explicitly add the version to the commandline (not just to the pom) because the build server kept using the old verison. This can be done as follows:
org.jacoco:jacoco-maven-plugin:0.7.9:prepare-agent
instead of
org.jacoco:jacoco-maven-plugin:prepare-agent
The jacoco plugin site (for sonar) states that argline must be added as a property. For me it also worken when using the @{argLine} in the surefire plugin settings.