jacoco offline instrumentation original class path

6.1k Views Asked by At

According to http://www.eclemma.org/jacoco/trunk/doc/offline.html, when doing offline instrumentation, I need to provide the original class files to generate the report. Exactly how do I do that with Maven? I know the original class file is saved under generated-classes folder so right now I'm just copying the generated-classes folder over the classes folder when running generating the report but is there a way to specify the original class file path within the POM file? I couldn't find any examples anywhere. Thanks!

1

There are 1 best solutions below

0
On BEST ANSWER

jacoco-maven-plugin provides instrument that comes in a pair with restore-instrumented-classes. And there is an example of usage in JaCoCo documentation - http://www.jacoco.org/jacoco/trunk/doc/examples/build/pom-offline.xml