It’s good to check the latest JaCoCo example project pom.xml to be in touch with the fresh default plugin configuration.
Broke the JaCoCo Agent with the Surefire configuration
Maven Surefire Plugin is used to execute unit tests during the test phase of the build lifecycle.
It’s included in project’s pom.xml implicitly, one way you can check this is by running the command at the project’s root
and among other stuff you get the plugin with its default version for current Maven distribution
<!-- forkMode is deprecated since version 2.14 --><forkMode>never</forkMode><!-- this line breaks JaCoCo Agent --> ...
You can re-enable normal work of the JaCoCo Agent by:
specifying the forkCount of any reasonable positive integer
The reuseForks indicates if forked VMs can be reused. If set to false, a new VM is forked for each test class to be executed.
If set to true, up to forkCount VMs will be forked and then reused to execute all tests.