【问题标题】:SonarQube can't find the project configuration pathSonarQube 找不到项目配置路径
【发布时间】:2013-11-14 19:22:53
【问题描述】:

有人知道怎么解决吗?

C:\sonar-runner\bin\..
SonarQube Runner 2.3
Java 1.7.0_45 Oracle Corporation (64-bit)
Windows Server 2012 6.2 amd64
INFO: Error stacktraces are turned on.
INFO: Runner configuration file: C:\sonar-runner\bin\..\conf\sonar-runner.properties
INFO: Project configuration file: NONE
INFO: Default locale: "pt_BR", source code encoding: "windows-1252" (analysis is platform dependent)
INFO: Work directory: C:\sonar-runner\bin\.sonar
INFO: SonarQube Server 4.0
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 7.425s
Final Memory: 6M/31M
INFO: -----
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: You must define the following mandatory properties for 'Unknow
n': sonar.projectKey, sonar.projectName, sonar.projectVersion, sonar.sources

由于某种原因,SonarQube 找不到配置项目路径 它从 INFO 中返回 NONE。 我已经在 sonar-runner 的 conf 路径中有该文件。

【问题讨论】:

    标签: sonarqube sonar-runner


    【解决方案1】:

    重要:项目配置文件的名称必须是: “sonar-project.properties”(不是 sonar-scanner.properties)

    而且你必须从你的项目路径中启动sonar-scaner 命令。

    【讨论】:

      【解决方案2】:

      您需要在基础目录中添加项目配置文件。

      即C:\sonar-runner\bin

      【讨论】:

        【解决方案3】:

        如果你仔细阅读doc page "Analyzing with SonarQube Runner",你可以阅读:

        Run the following command from the project base directory to launch the analysis:
        

        最重要的部分是“来自项目基目录”。这应该可以回答您的问题。

        【讨论】:

          猜你喜欢
          • 2023-04-08
          • 1970-01-01
          • 1970-01-01
          • 2010-11-25
          • 1970-01-01
          • 2015-07-11
          • 2016-05-27
          • 2013-03-27
          • 2022-01-02
          相关资源
          最近更新 更多