We scan projects with the sonar-maven-plugin and struggle over this error in the respective Jenkins stage
...
14:46:19 [INFO] Sensor JaCoCoSensor
14:46:19 [WARNING] You are not using the latest JaCoCo binary format version, please consider upgrading to latest JaCoCo version.
14:46:19 [INFO] Analysing D:\jenkins\workspace\example-master-TD7G6HW7YEVZGI5SB6KAKUAC2HNRPENMLFLUMZSUIJN4VX6DGSKQ\..\target\jacoco.exec
14:47:06 Exception in thread "xxxx" java.lang.OutOfMemoryError: GC overhead limit exceeded
14:47:06 at java.util.ArrayList.iterator(ArrayList.java:840)
14:47:06 at com.persistit.TimelyResource.prune(TimelyResource.java:303)
14:47:06 at com.persistit.Persistit.pruneTimelyResources(Persistit.java:2499)
14:47:06 at com.persistit.Persistit.cleanup(Persistit.java:1531)
14:47:06 at com.persistit.CleanupManager.poll(CleanupManager.java:157)
14:47:06 at com.persistit.CleanupManager.runTask(CleanupManager.java:88)
14:47:06 at com.persistit.IOTaskRunnable.run(IOTaskRunnable.java:144)
14:47:06 at java.lang.Thread.run(Thread.java:748)
...
Problem is resolved when the sonar.jacoco.reportPath property is added to the pom.xml (line 6):
This can be found reading trough comments of https://wiki.jenkins.io/display/JENKINS/JaCoCo+Plugin