Skip to content
Latchkey

JaCoCo "Skipping JaCoCo execution" / no exec file in CI

JaCoCo skips the report or check because no jacoco.exec execution-data file was produced. The coverage agent was not attached when tests ran, usually because the prepare-agent goal did not bind or argLine was overwritten.

What this error means

The build logs "Skipping JaCoCo execution due to missing execution data file" and the report goal produces nothing, or coverage shows as 0%.

JaCoCo
[INFO] Skipping JaCoCo execution due to missing execution data file:
/home/runner/work/app/app/target/jacoco.exec

Common causes

prepare-agent did not bind, so no agent recorded data

Without the prepare-agent goal (or if it is in a profile that did not activate), Surefire runs without the JaCoCo agent and writes no exec file.

Surefire argLine overwrote the agent argument

Setting <argLine> directly in Surefire config clobbers the @{argLine} JaCoCo injects, so the agent is never attached.

How to fix it

Bind prepare-agent and preserve argLine

  1. Bind the prepare-agent goal so the agent attaches before tests.
  2. If you set a custom Surefire argLine, reference @{argLine} so JaCoCo's addition is preserved.
  3. Re-run so target/jacoco.exec is produced before report/check.
pom.xml
<execution>
  <id>prepare-agent</id>
  <goals><goal>prepare-agent</goal></goals>
</execution>

Keep the JaCoCo argLine when overriding Surefire

Reference the property JaCoCo populates instead of replacing it.

pom.xml
<argLine>@{argLine} -Xmx1024m</argLine>

How to prevent it

  • Always bind prepare-agent in the build that runs tests.
  • Use @{argLine} when customizing Surefire arguments.
  • Verify target/jacoco.exec exists before report/check goals run.

Frequently asked questions

What causes ""Skipping JaCoCo execution""?
Without the prepare-agent goal (or if it is in a profile that did not activate), Surefire runs without the JaCoCo agent and writes no exec file.
How do I fix "Skipping JaCoCo execution"?
Bind prepare-agent and preserve argLine

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card