maven jacoco: not generating code coverage report
Any particular reason why you are using an outdated version of the JaCoCo plugin? For Java 8 support, you have to use at least version 0.7.0 (see changelog).
In your configuration, the report goal is bound to the verify phase, so running mvn test
won't generate any report because it does not run the verify phase (test phase comes before verify). You have to use mvn verify
to execute tests and generate the report.
The JaCoCo project provides example Maven configurations. You can try "this POM file for a JAR project runs JUnit tests under code coverage and creates a coverage report".
JaCoco Maven Plugin is overriding Surefire argLine, in case you also need to override argLine, be sure to keep argLine variable:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<argLine>-Xmx1024M ${argLine}</argLine>
</configuration>
</plugin>
Note you can change this property name, as describe in the jacoco plugin documentation.