0

I am trying to generate a coverage report of an application while it is executing using Jacoco CLI. I am first running:

java -javaagent:$wd/jacocoagent.jar=destfile=./scripts/petclinic-benchmarks/results/jacoco.exec -jar $wd/examples/src/main/scala/examples/petclinic/spring-petclinic-rest-2.6.2.jar

Followed with:

java -jar jacococli.jar report ./scripts/petclinic-benchmarks/results/jacoco.exec --classfiles ./benchmarks/spring-petclinic-rest/target/classes/org/springframework/samples/petclinic --html ./scripts/petclinic-benchmarks/results/ --name myreport --sourcefiles ./benchmarks/spring-petclinic-rest/src/main/java/org/springframework/samples/petclinic

The problem is that when running the second command I get the following error:

[WARN] Some classes do not match with execution data.
[WARN] For report generation the same class files must be used as at runtime.

I have already looked at previous questions and I've done what they recommend doing. That is, making sure that the application is first compiled with the same java version as the one we're executing the application with.

griz
  • 119
  • 7

0 Answers0