为多个项目设置Sonar属性文件

时间:2018-02-13 10:20:38

标签: sonarqube

我想分析多个项目,我想将两个报告分开,以便我有一个用于CA_Report包,一个用于CallCenter包。我尝试过Setup sonar-runner for multiple java projects 和{{3}的解决方案我尝试使用sonar-project.properties来解决以下错误,但它不适用于我的后续cmd。

Cmd

  

CD / D D:\ trunk
      SonarQube.Scanner.MSBuild.exe开始/ k:“myProject”/ n:“myProject”/v:"1.0“
      “C:\ Program Files(x86)\ MSBuild \ 14.0 \ Bin \ MSBuild.exe”/ t:Rebuild

错误
MSBUILD:错误MSB1003:指定项目或解决方案文件。当前工作目录不包含项目或解决方案文件。

我有一个具有以下包结构的项目

-trunk(folder with sonar-project.properties)  
    -Center   
        -CA_Report(folder with source files)  
            -CA_Report.sln
        -CallCenter(folder with source files)  
            -RBSolution.sln   
    -sonar-project.properties

我的sonar-project.properties文件如下所示

sonar.host.url=http://localhost:9000
sonar.sourceEncoding=UTF-8
sonar.projectKey=FubonLifeCallCenterConfigureTest
sonar.projectName=FubonLifeCallCenterConfigureTest
sonar.projectVersion=1.0
sonar.sources=trunk/Center/CA_Report,trunk/Center/CallCenter
sonar.projectBaseDir=D:\\FubonLife\\trunk\\Center

sonar.modules=CA_Report,CallCenter
CA_Report.sonar.projectBaseDir=D:\\FubonLife\\trunk\\Center\\CA_Report
CA_Report.projectKey=CA_Report
CA_Report.projectName=CA_Report
CA_Report.sources=trunk/Center/CA_Report

CallCenter.sonar.projectBaseDir=D:\\FubonLife\\trunk\\Center\\CallCenter
CallCenter.projectKey=CallCenter
CallCenter.projectName=CallCenter
CallCenter.sources=trunk/Center/CallCenter

0 个答案:

没有答案