1

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

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 路径中有该文件。

4

3 回答 3

3

如果您仔细阅读文档页面“Analyzing with SonarQube Runner”,您可以阅读:

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

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

于 2013-11-15T16:36:22.463 回答
1

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

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

于 2019-05-27T15:03:02.617 回答
-1

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

C:\sonar-runner\bin

于 2013-11-26T13:58:24.737 回答