sonarqube – 将分析父项目的MultiProject Gradle Build?

我有一个多项目gradle构建,我试图使用sonarqube进行分析.它成功分析了项目中的所有嵌套模块,但不分析基础或父项目.

我在日志中看到这个警告:

12:07:23.332 WARN – /!\ A multi-module project can’t have source folders, so ‘C:\workspaces\platform\myProject\src\main\java‘ won’t be used for the analysis. If you want to analyse files of this folder, you should create another sub-module and move them inside it.

有没有办法将父src,test和binary作为要扫描的文件夹移出而不创建父模块子模块?

我的SonarQube属性如下所示:

sonarqube{
properties {
    property "sonar.host.url", "http://ww:80"
    property "sonar.jdbc.url", "jdbc:jtds:sqlserver://db:5555;databaseName=sonarqube"
    property "sonar.jdbc.driverClassName", "net.sourceforge.jtds.jdbc.Driver"
    property "sonar.jdbc.username", "u"
    property "sonar.jdbc.password", "p"
    property "sonar.scm.disabled", "true"  
    property "sonar.junit.reportsPath", "${buildDir}/test-results"     
    property "sonar.jacoco.reportPath", "${buildDir}/jacoco/test.exec"
    property "sonar.modules" , ""  }
}

最佳答案 这是SonarQube的一个众所周知的限制.您可以关注/投票:
https://jira.sonarsource.com/browse/SONARGRADL-5

点赞