Hi Tim,
for the first point we need our Maven wizards here to jump in: Evgeny,
Mirko, any ideas?
Cheers,
-marc
On 2014-09-26 11:53, Tim Webster wrote:
Hi Marc,
thanks for your answer.
But regarding the first point - forgetting the SonarQube stuff - can I
set parameters (specifically includes or excludes) directly from the
command line? If I do this:
clean org.jacoco:jacoco-maven-plugin:prepare-agent install
-Dincludes=com.mycompany.*
the property just gets ignored. However I see that some properties
have a corresponding 'user property'. if I do this:
clean org.jacoco:jacoco-maven-plugin:prepare-agent install
-Djacoco.destFile=jacoco.exec
I see that it's included in the argLine:
argLine set to
-javaagent:C:\Users\twebster\.m2\repository\org\jacoco\org.jacoco.agent\0.7.1.201405082137\org.jacoco.agent-0.7.1.201405082137-runtime.jar=destfile=D:\w2\RandD\dms-migration-toolkit\JACOCO.EXEC
Is this because there is no 'user property' for includes/excludes?
If so, why not?
thanks,
tim
On Fri, Sep 26, 2014 at 9:26 AM, Marc Hoffmann
<[email protected]> wrote:
Hi Tim,
regarding your second point. JaCoCo by default uses on-the-fly
instrumentation. At this point in time there is no easy way to know
where the classes actually come from (e.g. project or 3rd party). So
by default JaCoCo collects coverage data for all classes not loaded
by the system classloader. The overhead is very small, so this
shouldn't be an issue.
Regards,
-marc
On 2014-09-25 19:07, Tim Webster wrote:
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 [1]
[1].
Links:
------
[1] https://groups.google.com/d/optout [1]
--
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 [1].
--
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 [1].
Links:
------
[1] https://groups.google.com/d/optout
--
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.