JaCoCo report not generated: the causes in Maven and Gradle
Eight ways to end up with no report, each reproduced with JaCoCo 0.8.16, Maven and Gradle, and the fix for each.

A JaCoCo report needs two steps: the agent records jacoco.exec while the
tests run, then the report goal turns it into HTML and XML. If the log says
“Skipping JaCoCo execution due to missing execution data file”, the first
step failed. If there is a jacoco.exec but no target/site/jacoco, the
second step never ran.

Causes at a glance
| Build | Cause | jacoco.exec | Report |
|---|---|---|---|
| Maven | No report execution | Yes | No |
| Maven | report bound to verify, you ran mvn test | Yes | No |
| Maven | No prepare-agent execution | No | No |
| Maven | Surefire <argLine> without @{argLine} | No | No |
| Maven | <forkCount>0</forkCount> | No | No |
| Maven | -DskipTests, or jacoco:report after mvn compile | No | No |
| Gradle | gradle test without jacocoTestReport | Yes | No |
| Gradle | gradle jacocoTestReport on its own after clean | No | No (task skipped) |

We reproduced each one with JaCoCo 0.8.16, Maven 3.9.16, Surefire 3.5.4 and
Gradle 9.7.1 on JDK 26, on a small project whose working setup writes the
report on mvn test.
The Maven setup that works
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.16</version>
<executions>
<execution><goals><goal>prepare-agent</goal></goals></execution>
<execution>
<id>report</id><phase>test</phase><goals><goal>report</goal></goals>
</execution>
</executions>
</plugin>
prepare-agent puts -javaagent:…org.jacoco.agent-0.8.16-runtime.jar into
the argLine property; Surefire passes it to the forked test JVM. The
report execution, bound to test, writes target/site/jacoco. Bind it to
verify if you prefer, and then run mvn verify.
Surefire argLine: the most common cause
<configuration>
<argLine>-Xmx512m</argLine>
</configuration>
This replaced the agent’s argLine. The tests ran without the agent, no
jacoco.exec was written, and the report goal printed “Skipping JaCoCo
execution due to missing execution data file”. Keep the agent with late
property evaluation:
<configuration>
<argLine>@{argLine} -Xmx512m</argLine>
</configuration>
The report came back. <forkCount>0</forkCount> fails the same way: the
tests run inside Maven’s own JVM, where the agent was never attached.
Gradle
tasks.test {
finalizedBy(tasks.jacocoTestReport)
}
The jacoco plugin records build/jacoco/test.exec on every gradle test,
but writes the report only when jacocoTestReport runs. finalizedBy runs
it after every test run; gradle test jacocoTestReport works too.
gradle jacocoTestReport alone does not run the tests: after clean it was
skipped. Setting jvmArgs on the test task did not break the report, unlike
Maven’s argLine.
What Supercov adds
npx supercov -- mvn test
npx supercov runs latest gaps
Supercov attaches its own measurement to the build it runs, so a missing agent or report goal does not apply. It records which test covered each line, with branches and MC/DC. See JaCoCo exclude to leave classes out of the report, JaCoCo aggregate report for a multi-module build, and Java code coverage tools for the alternatives.
More coverage guides
- Jest coverageThreshold: global, per-folder and per-file
- JaCoCo aggregate report for multi-module Maven and Gradle builds
- pytest ignore directory: --ignore, norecursedirs and collect_ignore
- Merge coverage reports from shards: Vitest, Jest and coverage.py
- Statement vs branch coverage, with decision, line and path coverage
- Kover exclude: classes, packages and generated code
- sonar.coverage.exclusions: why SonarQube ignores your JaCoCo excludes
- istanbul ignore next vs c8 ignore next: every hint, measured
- Go test coverage exclude: files, packages and mocks
- Jest coverage exclude: files, folders and lines
- pytest coverage exclude: omit files, folders and lines
- Vitest coverage exclude: files, folders and lines
- JaCoCo exclude in Maven and Gradle: packages, classes and generated code