gpt4 book ai didi

sonarqube - 使用 SonarQube 进行多模块项目分析

转载 作者:行者123 更新时间:2023-12-04 13:59:13 26 4
gpt4 key购买 nike

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”文件夹,希望此配置与该链接中可用的 conf 相同。据了解,如果配置良好,则 Invoice 和 Receipt 将列为 子项目在 Account Project 下,那么在上述配置中需要进行哪些更改才能实现一个项目下的多模块/项目。

错误
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.

最佳答案

试试这个:

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

关于sonarqube - 使用 SonarQube 进行多模块项目分析,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32227360/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com