SonarQube Server 5.1.2, Sonar-Runner 2.4
正如Multi-moduleProject中提供的,我已经创建了一个项目结构
Accounts
|
->invoice
|
->src
->receipt
|
->src
->sonar.properties
文件:sonar.properties
sonar.projectKey=org.mycompany.acc
sonar.projectName=Account
sonar.projectVersion=1.0
sonar.sources=src
sonar.modules=invoice,receipt
invoice.sonar.projectName=Invoice
receipt.sonar.projectName=Receipt
在sonar-runner中使用上述配置执行时遇到错误" src" "帐号"中缺少文件夹目录,希望此配置与该链接中可用的配置相同。根据理解,如果配置正常,那么发票和收据将在帐户项目下列为子项目,那么在上述配置中需要进行哪些更改才能在一个项目下实现多个模块/项目
错误
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: The folder 'src' does not exist for 'org.mycompany.acc' (base
directory = C:\Users\xyz\Accounts\.)
ERROR:
ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with t
he -e switch.
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
答案 0 :(得分:10)
试试这个:
sonar.projectKey=org.mycompany.acc
sonar.projectName=Account
sonar.projectVersion=1.0
sonar.sources=src # try to remove this by the way if you don't have suchdirectory under root folder of project
sonar.modules=invoice,receipt
invoice.sonar.projectName=Invoice
invoice.sonar.sources=invoice/src
receipt.sonar.projectName=Receipt
receipt.sonar.sources=receipt/src
答案 1 :(得分:0)
您可以尝试使用此选项。如果要同时扫描多个项目或在同一版本中进行扫描,请尝试此选项。
sonar.sources =发票,收据