Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-1684

Jacoco extension filters do not work as advertised

    Details

      Description

      The Jacoco includes/excludes mechanism does not work the way the 1.0.0.Alpha5 release announcement 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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                hkatyal Hemani Katyal
                Reporter:
                rcd Richard DiCroce
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: