【发布时间】:2018-07-26 02:50:52
【问题描述】:
我正在使用 MSBuild。我安装了 Java 8。
我正在运行以下命令:
SonarQube.Scanner.MSBuild.exe begin /k:"ABC" /d:sonar.host.url="http://localhost:9000" /d:sonar.login="8b839xxxxxxxxxxxxxxxxxxxxxxx6b00125bf92" /d:sonar.verbose=true
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\msbuild.exe" /t:rebuild
SonarQube.Scanner.MSBuild.exe end /d:sonar.login="8b839xxxxxxxxxxxxxxxxxxxxxxx6b00125bf92"
最后一步失败:
ERROR: Error during SonarQube Scanner execution
ERROR: The 'report' parameter is missing
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
The SonarQube Scanner did not complete successfully
12:53:21.909 Creating a summary markdown file...
12:53:21.918 Post-processing failed. Exit code: 1
MSBuild 版本大于 14。
Java 8 已正确安装。文档表明 Java 8 就足够了。
- 您知道可能出了什么问题吗?
- 在哪里添加 -X 开关?我尝试了所有 3 个语句
更新:我安装了 Java SDK 9。仍然是同样的问题。 更新:使用详细日志记录并使用 /n 命名参数:
INFO: Analysis report generated in 992ms, dir size=4 MB
INFO: Analysis reports compressed in 549ms, zip size=1 MB
INFO: Analysis report generated in C:\ABC\.sonarqube\out\.sonar\scanner-report
DEBUG: Upload report
DEBUG: POST 400 http://localhost:9000/api/ce/submit?projectKey=ABC | time=1023ms
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 54.833s
INFO: Final Memory: 51M/170M
INFO: ------------------------------------------------------------------------
DEBUG: Execution getVersion
DEBUG: Execution stop
ERROR: Error during SonarQube Scanner execution
ERROR: The 'report' parameter is missing
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
Process returned exit code 1
The SonarQube Scanner did not complete successfully
Creating a summary markdown file...
Post-processing failed. Exit code: 1
【问题讨论】:
-
您的
begin不包含名称参数 (/n:"Foo")。虽然错误消息似乎与此无关,但我认为该参数是 MSBuild 分析所必需的,因此请尝试添加它以消除可能的错误来源。 -
嗨,G.Ann,感谢您的更新,我尝试使用 name 参数,但不幸的是仍然遇到。我已经发布了更新的问题,其中包含更多详细信息
-
仅供参考@Peter PitLock,我已经用尽了我在该主题上的专业知识并被标记为希望能引起更多知识渊博的人的注意。
-
如果禁用声纳线没有错误? SonarQube.Scanner.MSBuild.exe 的版本号是多少?
-
@G.Ann-SonarSourceTeam - 我以答案的形式添加到这个问题中。一旦您的团队找到解决方案,我将很乐意删除此内容。
标签: windows msbuild sonarqube sonarqube-scan