Hi Benoit,
If you try to generate native JaCoCo report ( report goal of jacoco-maven-plugin ) , I’m pretty sure that this one will also be empty. To me seems that reason is that JaCoCo agent is not actually used during execution of tests and this is pretty common mistake described in JaCoCo documentation - see JaCoCo - jacoco:prepare-agent , which states:
If your project already defines VM arguments for test execution, be sure that they will include property defined by JaCoCo.
define “argLine” as a Maven property rather than as part of the configuration of maven-surefire-plugin:
<properties> <argLine>-your -extra -arguments</argLine> </properties> ... <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <!-- no argLine here --> </configuration> </plugin>
However you do exactly opposite
Hope this helps.