]
Bartosz Majsak reassigned ARQ-1684:
-----------------------------------
Assignee: Hemani Katyal (was: Bartosz Majsak)
Jacoco extension filters do not work as advertised
--------------------------------------------------
Key: ARQ-1684
URL:
https://issues.jboss.org/browse/ARQ-1684
Project: Arquillian
Issue Type: Bug
Components: Extension - Jacoco
Affects Versions: jacoco_1.0.0.Alpha6
Reporter: Rich DiCroce
Assignee: Hemani Katyal
Fix For: jacoco_1.0.0.Alpha9
The Jacoco includes/excludes mechanism does not work the way the [1.0.0.Alpha5 release
announcement|http://arquillian.org/blog/2012/11/27/arquillian-extension-j...]
implies it does. Specifically, the release announcement shows excluding a package and then
including some sub-packages. This implies that includes have precedence over excludes, but
that is not true. It's clear from looking at the source code that includes and
excludes just get turned into filters that are all ANDed together. So if you have
exclude some.package.*
include some.package.foo.*
then some.package.foo will not be included because the exclude for some.package will
return false. Effectively, excludes have priority over includes.
This would be fine if not for the fact that an "include everything" filter is
automatically added. This, combined with exclusions having priority, breaks a key use
case, namely: I want to exclude all packages that are not my own code. I can't just
include my.package.*
because of the automatic include all filter, and I can't
exclude *
include my.package.*
because the exclude blocks out the include.
Including everything is a problem because then so many classes have to be instrumented
that the test just hangs and the archive never gets deployed. For me, this makes the
Jacoco extension completely unusable.