I'm facing a error which starting to be really irritating.
Here is what I have:
1) Sonar 3.5 which uses JaCoCo as coverage tool.
2) Jmockit lib to perform testing with use of mocks.
3) Build process automized with maven.
So when I run first mvn clean install
which is ok and then I'm running mvn sonar:sonar
and what is happening here:
50Mb
(!), which is not acceptable. A lot of free space is just eaten up by such a logs on our CI machine. Here are the exceptions I've got:
java.lang.instrument.IllegalClassFormatException: Error while instrumenting class app/MyClass.
Caused by: java.lang.IllegalStateException: Class app/MyClass is already instrumented.
Assuming that suppression of such an exceptions is impossible I investigated it a little bit and found out that JaCoCo (a tool, which Sonar uses and a tool, which can't instrument already instrumented classes) have such a mode as offline instrumentation
(AFAIK Sonar neither support this offline instrumentation
or can suppress such a warnings). This thing is designed to be used exactly for such a cases. So I tried to set up JaCoCo as a plugin in maven, but I failed to do this cause JaCoCo can't find some execution file. When I'm running mvn clean install
the following error pops up:
[INFO] --- jacoco-maven-plugin:0.6.2.201302030002:report (report) @ webservice-mws --- [INFO] Skipping JaCoCo execution due to missing execution data file
If I'm not mistaken this execution file is the RESULT of the JaCoCo plugin. I'm totally frustrated and do not know what to do with this.
If somebody can help me with that it will be greatly appreciated!
Thanks in advance!
my pom.xml settings for JaCoCo plugin:
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.6.2.201302030002</version>
<executions>
<execution>
<phase>process-test-resources</phase>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>verify</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
You may use Cobertura as your code coverage on Sonar 3.5.1.
To change it:
Worked like charm on my project ^_-
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With