Skip to content

Does not respect excludeFiles/excludePackages #96

Closed
@iansan5653

Description

@iansan5653

I'm using scoverage.maven.plugin 1.4.0-M5, Scala 2.11.12.

I'd like to exclude my service declaration files from coverage reports because they don't contain testable logic. This seems simple, but I can't get the scoverage plugin to ignore the files or classes.

All of the service classes are named like HomeService, NotificationService, etc. And they are all in a package under com.intermediate_packages.service.

I'm generating the coverage report by running mvn clean scoverage:report. I've also tried deleting the target folder in case some leftover file is still being read. No luck there either.

My pom for the plugin looks like:

<plugin>
  <groupId>org.scoverage</groupId>
  <artifactId>scoverage.maven.plugin</artifactId>
  <configuration>
    <!-- CONFIGURATION -->
  </configuration>
</plugin>

Where I've tried all of the following for CONFIGURATION:

<excludedFiles>.*Service.*</excludedFiles>
<excludedPackages>.*service.*</excludedPackages>
<excludedFiles>.*Service\.scala</excludedFiles>
<excludedPackages>.*Service</excludedPackages>

And even just as a sanity check I tried this, which also had absolutely no effect:

<excludedFiles>.*</excludedFiles>
<excludedPackages>.*</excludedPackages>

No matter what, it always says I have 26.05% statement coverage and lists the service files in the report index.html.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions