Hi,
As some of you know, since SonarQube changed to execute coverage before
analysis, they recommend to execute Jacoco like so:
mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent
install -Dmaven.test.failure.ignore=true
However, I need to include some parameters for the plugin (mainly
'includes' to make sure I don't instrument some 3rd party jars like JIDE).
Is there anyway to pass Jacoco parameters to the plugin execution using the
above format, or do I have to use the old <argLine> thing and configure the
plugin in the POM like so:
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
<propertyName>surefireArgLine</propertyName>
<includes>
<include>com.mycompany.*</include>
</includes>
</configuration>
My problem is the first method is a lot simpler, and I'm also having
problems getting the Coverage reports to show up in SonarQube using the
second method (which is probably a separate issue that I've not fully
investigated). My preference would be to use the first method.
Also - does Jacoco always try to instrument everything on the project
classpath by default, even classes that aren't part of the project source,
like 3rd party jars?
Thanks
--
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].
For more options, visit https://groups.google.com/d/optout.