Build Failure because of jacoco-maven-plugin
Opened this issue · 1 comments
In the pom.xml file, there is the following code:
This plugin appears to have issues when run. on Docker. The suggested fix in the class comments of adding ./mvnw clean verify before ./mvnw package does not prevent the following build failure:
[INFO] --- jacoco-maven-plugin:0.8.5:report (report) @ spring-petclinic ---
[INFO] Loading execution data file /var/jenkins_home/workspace/spring-petclinic/target/jacoco.exec
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:30 min
[INFO] Finished at: 2022-04-30T01:34:55Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jacoco:jacoco-maven-plugin:0.8.5:report (report) on project spring-petclinic: An error has occurred in JaCoCo report generation.: Error while creating report: null: EOFException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Build step 'Execute shell' marked build as failure
Finished: FAILURE
I'm having the same issue, anyone has a solution? Googling says it's due to the Jacoco exec file truncated while copied from the host to the Docker container VM, which seems common on Mac OS. However, I'm not seeing a working solution for it.