Sonarqube Gradle插件如何定位测试资源

时间:2017-06-23 18:31:15

标签: java sonarqube sonarqube-scan gradle-plugin

我有一个带子模块的Java项目设置:

cool-as-winter
    snowman
        src
            main
            test
            integrationTest
    snow-plower
        src
            main
            test
            integrationTest
    iceman
        src
            main
            test
            integrationTest
                com
                    example
                       AntiFreezeTest.java

我在根项目级别的build.gradle:

sonarqube {
    properties {
        property "sonar.projectName", "Cool Service"
        property "sonar.projectKey", "com.example:cool-as-winter"  
        property "sonar.sourceEncoding", "UTF-8"
        property "sonar.tests", "src/test, src/integrationTest"
        property "sonar.jacoco.reportPaths", "$buildDir/jacoco/text.exec, $buildDir/jacoco/integrationTest.exec"
        property "sonar.java.test.binaries", "$buildDir/classes/integrationTest, $buildDir/classes/test"
    }
}

但是,当我运行sonar任务时,我得到“未找到资源:com.example.AntiFreezeTest.com”

0 个答案:

没有答案