Hi,

you cannot combine offline instrumentation with the JaCoCo agent. This results in classes getting instrumented twice. See documentation

    http://eclemma.org/jacoco/trunk/doc/offline.html

and our example project here:

http://eclemma.org/jacoco/trunk/doc/examples/build/pom-offline.xml

Regards,
-marc

On 26.10.15 15:25, [email protected] wrote:
Hi ,

I am getting an error is already instrumented while using jacoco code coverage 
using maven. My project is maven project.It has maven dependencies powermock, 
mockitto and jacoco plugin.
I believe it is causing error "default-restore-instrumented-classes". If I 
remove this it is not generating jacoco coverage report.
When I run mvn clenn install, the build is working fine and generating jacoco 
coverage report. But in console it is generating huge exceptions already 
instrumented

        <plugin>
                                <groupId>org.jacoco</groupId>
                                <artifactId>jacoco-maven-plugin</artifactId>
                                <version>${jacoco.version}</version>
                                <executions>
                                        <execution>
                                                <goals>
                                                        
<goal>prepare-agent</goal>
                                                </goals>
                                        </execution>
                                        <execution>
                                                <id>report</id>
                                                <phase>package</phase>
                                                <goals>
                                                        <goal>report</goal>
                                                </goals>
                                        </execution>
<execution>
                         <id>default-instrument</id>
                         <goals>
                             <goal>instrument</goal>
                         </goals>
                     </execution>
                     <execution>
                         <id>default-restore-instrumented-classes</id>
                         <goals>
                             <goal>restore-instrumented-classes</goal>
                         </goals>
                     </execution>
</executions>
                        </plugin>
                </plugins>


--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/562E9A06.8090406%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to