【问题标题】:Sonarqube evaluation - Ant Build failingSonarqube 评估 - Ant Build 失败
【发布时间】:2016-06-12 16:07:58
【问题描述】:

更新以反映 Sonar-Runner

我们已经配置了这些项目:

我们在包含我们的应用程序源的文件夹的根目录中使用这个 sonar-project.properties 文件:

sonar.projectKey=Southern
sonar.projectName=Southern
sonar.projectVersion=1.0
sonar.sources=.

我们在上述属性文件所在的同一文件夹中运行 sonar-runner 命令。我们得到以下错误:

ERROR: Error during SonarQube Scanner execution
ERROR: Unable to load component class org.sonar.batch.report.ActiveRulesPublishe
r
ERROR: Caused by: Unable to load component interface org.sonar.api.batch.rule.Ac
tiveRules
ERROR: Caused by: Unable to load component class org.sonar.batch.rule.ModuleQPro
files
ERROR: Caused by: Error 500 on http://localhost:9000/api/qualityprofiles/search.
protobuf?projectKey=Southern
ERROR:

SonarQube 应用程序和网站正在运行并可用。

【问题讨论】:

  • sonar.java.libraries 属性应该指向保存项目库的目录,而不是 SonarQube 平台的库。
  • 尝试将其指向项目的 lib 文件夹,但仍然失败。想要更改为使用 sonar-runner 但安装文件夹的 bin 文件夹中没有 sonar-runner exe 或 cmd 文件?它不是一个附加组件。 sonar-runner 有单独的下载吗?
  • 这是一个单独的下载(就像 Ant 任务 jar 一样,顺便说一句)。检查the scanner docs
  • 更新了属性文件:sonar-sources=src 并且能够进行全面扫描。但是,通过 StartSonar.bat 运行的应用程序会不断终止,因此不会处理扫描输出。是否有任何日志可以表明声纳为何不断终止?以前没有这样做。我已经使用了几个小时,现在它在启动后一分钟左右就关闭了。
  • 添加信息如何解决这个问题而不是“解决”文本。

标签: java ant sonarqube


【解决方案1】:

下载了声纳运行器。

更新的属性文件:sonar-sources=src。扫描运行但因数据库已锁定的错误而挂起。

重新启动机器并重新启动 SonarQube。问题已解决。所有扫描都运行。

【讨论】:

    猜你喜欢
    • 2015-05-10
    • 2018-03-31
    • 2014-10-11
    • 1970-01-01
    • 1970-01-01
    • 2018-06-25
    • 2020-09-16
    • 2020-04-21
    • 2011-10-06
    相关资源
    最近更新 更多