I\'m having trouble generating AHP reports via JaCoCo in one of my modules. When the build starts, I see JaCoCo correctly setting argLine with:
[INFO] jacoco.age
To solve this issue I would use the following three steps:
Determine which plugin execution is producing the jacoco.exec
file. To do that, you could run Maven with debug logging enabled (mvn -X
) and look for the jacoco.agent.argLine
property name or its value in the output. You could also have a look at the effective POM (mvn help:effective-pom
) in case the relevant configuration comes from the parent POM. Note that my guess is that it's an execution of the maven-failsafe-plugin
.
Determine the phase that plugin is executed in. E.g. for maven-failsafe-plugin
this would likely be integration-test
.
Change the configuration of the JaCoCo plugin so that the report
goal is executed later in the build lifecycle. E.g. if the jacoco.exec
file is produced in the integration-test
phase, you could execute the report
goal in the post-integration-test
phase.