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
If your project already uses the argLine to configure the surefire-maven-plugin, be sure that argLine defined as a property, rather than as part of the plugin configuration. For example:
-your -extra -arguments
...
org.apache.maven.plugins
maven-surefire-plugin
Resulting coverage information is collected during execution and by default written to a file when the process terminates.
Worked for me. See: http://www.eclemma.org/jacoco/trunk/doc/prepare-agent-mojo.html