gradle plugin excludes as JaCoCo Task extension dosn't work

1,339 views
Skip to first unread message

Sandra Gerberding

unread,
Mar 17, 2016, 10:49:29 AM3/17/16
to JaCoCo and EclEmma Users
Hi,

we use gradle jacoco plugin (with the actual version of jacoco "0.7.6.201602180812"). 
We want to exclude classes from the analysis and use the JaCoCo Task extension, but it dosn't work. The command line params include the param "excludes", but it dosn't exclude the classes from analysis.

What's wrong with our configuration? 

the resulting command line output:
.....append=true,excludes=*Controller:Application:UrlMappings,.....

build.gradle
test {
jacoco {
excludes = ['*Controller',
'Application',
'UrlMappings']
}
}

Marc R. Hoffmann

unread,
Mar 17, 2016, 10:59:32 AM3/17/16
to jac...@googlegroups.com
Hi,

JaCoCo uses fully qualified names. Unless your classes actually reside in the default package you should specify com.yourorg.yourapp.Application.

Regards,
-marc
--
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 jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/ea1b1b4e-8221-489f-bd99-58cfe3f7f040%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
Marc Hoffmann
hoff...@mountainminds.com
_______________________________________________
Mountainminds GmbH & Co. KG

Nussbaumstr. 4 * 80336 Muenchen * Germany 
Phone/Fax +49-700-68664637 * 0700-MTNMINDS

Registergericht Muenchen * HRA 80201
Mountainminds Verwaltungs GmbH
Registergericht Muenchen * HRB 143183
Geschaeftsfuehrer Marc Hoffmann

Antony Zhong

unread,
Apr 3, 2016, 11:49:00 PM4/3/16
to JaCoCo and EclEmma Users
Can we exclude classes within file jacoco-agnet.properties?

It seems not working for me, when I try 

exclude=com.yourorg.yourapp.Application

or 

excludes=com.yourorg.yourapp.Application

Marc R. Hoffmann

unread,
Apr 4, 2016, 1:55:11 AM4/4/16
to jac...@googlegroups.com
Hi,

no you can't. The jacoco-agent.properties is used with offline instrumentation only, so classes are already instrumented at that point in time (http://www.eclemma.org/jacoco/trunk/doc/offline.html).

You need to filter classes for technical reasons please configure the instrumentation process.

If you want to exclude certain classes from the report please configure the reporting accordingly.

Regards,
-marc
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages