Maven Jacoco Configuration - Exclude classes/packages from report not working

前端 未结 7 2034
傲寒
傲寒 2020-11-28 21:00

I have a maven multi-module project and I\'m using jacoco-maven for code coverage reports. Some classes should not be reported, as they\'re Spring configuration and I\'m not

相关标签:
7条回答
  • 2020-11-28 22:03

    https://github.com/jacoco/jacoco/issues/34

    These are the different notations for classes we have:

    • VM Name: java/util/Map$Entry
    • Java Name: java.util.Map$Entry File
    • Name: java/util/Map$Entry.class

    Agent Parameters, Ant tasks and Maven prepare-agent goal

    • includes: Java Name (VM Name also works)
    • excludes: Java Name (VM Name also works)
    • exclclassloader: Java Name

    These specifications allow wildcards * and ?, where * wildcards any number of characters, even multiple nested folders.

    Maven report goal

    • includes: File Name
    • excludes: File Name

    These specs allow Ant Filespec like wildcards *, ** and ?, where * wildcards parts of a single path element only.

    0 讨论(0)
提交回复
热议问题