Sonar Maven Plugin: How do I exclude test source directories?

前端 未结 2 614
傲寒
傲寒 2021-02-19 05:57

I have a Maven project with Java sources and Scala test sources. I generate code coverage using Jacoco during the verify stage. When I try to run the s

相关标签:
2条回答
  • 2021-02-19 06:04

    Either add a step to remove the folder before running the SonarQube analysis. Or set exclusions on test files. See http://docs.sonarqube.org/display/SONAR/Narrowing+the+Focus#NarrowingtheFocus-IgnoreFiles

    0 讨论(0)
  • 2021-02-19 06:14

    sonar.test.exclusions should be used instead of sonar.exclusions

    <sonar.test.exclusions>
       **/test/*
    </sonar.test.exclusions>
    
    0 讨论(0)
提交回复
热议问题