SonarQube找不到项目配置路径

时间:2013-11-14 19:22:53

标签: sonarqube sonar-runner

任何人都知道如何解决这个问题?

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。 我已经在声纳跑步者的conf路径中找到了该文件。

3 个答案:

答案 0 :(得分:3)

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

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

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

答案 1 :(得分:0)

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

您必须从项目的路径启动sonar-scaner命令。

答案 2 :(得分:-1)

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

那是 C:\ sonar-runner \ bin