【问题标题】:Project in SonarQube is missingSonarQube 中的项目丢失
【发布时间】:2018-07-02 02:42:59
【问题描述】:

老办法

之前,我在 SonarQube 中以“旧”方式检查了一个 C# 项目:创建了一个名为 sonar-project.properties 的文件并在其上运行 Sonar-runner。这是使用 SonarQube 5.6 LTS。没有问题。

使用旧方法,我的项目在sonar-project.properties 中有一个类似project:trunk 的项目密钥和一个类似Project Name 的项目名称

新方式

几周前,我升级到了 SonarQube 6.7.1。 LTS。有了这个,我也改变了项目的检查方式。现在我先调用SonarQube.Scanner.MSBuild begin,然后编译我的项目,然后调用SonarQube.Scanner.MSBuild end。这部分似乎工作正常。

调用SonarQube.Scanner.MSBuild时,我给他一个参数/n:"Project Name"。据我所知,项目键没有参数。

我的问题

但现在我的问题是:我的项目时不时地被新方式检查,并没有在http://sonarqube-server:9000/projects的项目列表中列出 有时我可以看到该项目,但随后它消失了,我需要再次开始检查才能在 sonarqube-server 上看到它。

有人知道这是为什么吗?

编辑

另外,我在这里发布logs/web.log 的所有行的输出ERRORWARN

2018.01.19 11:50:16 ERROR web[][o.s.s.p.Platform] Web server startup failed: Found two files for the same plugin [php]: sonar-php-plugin-2.12.0.2871.jar and sonar-php-plugin-2.9.2.1744.jar
2018.01.19 11:52:33 ERROR web[][abap] No license for abap
2018.01.19 11:52:33 ERROR web[][swift] No license for swift

2018.01.19 11:52:33 WARN  web[][o.s.s.u.DeprecatedViews] Widget 'Sonargraph Structural Debt Dashbox' (sonargraph.structural_debt) is ignored. See org.sonar.api.web.page.PageDefinition to define pages.
2018.01.19 11:52:33 WARN  web[][o.s.s.u.DeprecatedViews] Widget 'Sonargraph Structure Dashbox' (sonargraph.structure) is ignored. See org.sonar.api.web.page.PageDefinition to define pages.
2018.01.19 11:52:33 WARN  web[][o.s.s.u.DeprecatedViews] Widget 'Sonargraph Architecture Dashbox' (sonargraph.architecture) is ignored. See org.sonar.api.web.page.PageDefinition to define pages.
2018.01.19 11:52:33 WARN  web[][o.s.s.u.DeprecatedViews] Widget 'Sonargraph Integration Architecture' (sonargraphintegration_architecture) is ignored. See org.sonar.api.web.page.PageDefinition to define pages.
2018.01.19 11:52:33 WARN  web[][o.s.s.u.DeprecatedViews] Widget 'Sonargraph Integration Structure' (sonargraphintegration_structure) is ignored. See org.sonar.api.web.page.PageDefinition to define pages.
2018.01.19 11:52:33 WARN  web[][o.s.s.u.DeprecatedViews] Widget 'Sonargraph Integration Structural Debt' (sonargraphintegration_structural_debt) is ignored. See org.sonar.api.web.page.PageDefinition to define pages.

您可以忽略ERROR 行和两个sonar-php-plugin:几天前我已经删除了版本为2.9.2.1744 的行。

【问题讨论】:

  • 能否请您查看服务器日志 (logs/web.log) 并搜索一些以 ERROR 或 WARN 开头的行?
  • @JulienL.-SonarSourceTeam:请参阅我最初问题中的编辑。
  • 您可以指定密钥:SonarQube.Scanner.MSBuild.exe begin /k:my-key。不确定这是否是您的问题的原因,但我建议您在 /n 之外使用它

标签: c# msbuild sonarqube sonarqube-scan


【解决方案1】:

在 Valeri 的评论之后,我注意到,我的两个项目在运行 SonarQube.Scanner.MSBuild 时使用了相同的密钥。这就是项目消失的原因。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-07-29
    • 2014-10-23
    • 1970-01-01
    • 1970-01-01
    • 2021-07-19
    • 2020-02-11
    • 2018-01-05
    相关资源
    最近更新 更多