I'm currently trying to add JaCoCo as a dependency on my spring boot maven project to see the code coverage for my unit tests. However, when I run the tests, it fails with error.
Failed to execute goal org.jacoco:jacoco-maven-plugin:0.8.3:report (report) on project test-rest-service: An error has occurred in JaCoCo report generation. Error while creating report: malformed input around byte 2 -> [Help 1]
All tests passes without failure so that isn't a problem.
The dependency for JaCoCo is:
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.3</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
The JaCoCo.exec file is produced but I can't open it to generate the report. What am I doing wrong?