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

前端 未结 7 2085
傲寒
傲寒 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 21:38

    Use sonar.coverage.exclusions property.

    mvn clean install -Dsonar.coverage.exclusions=**/*ToBeExcluded.java
    

    This should exclude the classes from coverage calculation.

提交回复
热议问题