g0t4 / course-jenkins-getting-started

Jenkins Getting Started (jgsu) Course Materials - An update to my initial version of the course
MIT License
65 stars 391 forks source link

Build Failure because of jacoco-maven-plugin #5

Open Vinesse-Nevertheless opened 2 years ago

Vinesse-Nevertheless commented 2 years ago

In the pom.xml file, there is the following code:

Screen Shot 2022-04-29 at 10 04 00 PM

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

YunjunWang commented 2 years ago

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.