我使用的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。
8 Java的正确安装。文件指出的Java 8是足够的。
更新:我安装的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
我挣扎着SonarQube同样的问题,我终于找到了解决办法:你需要使用的评估令牌后重新启动声纳服务。
请注意,这不是问题的答案,但是我觉得这个反馈是得到这个问题的回答是有价值的。
http://localhost:9000/api/ce/submit?projectKey=myProjectKey
这将返回
{
"errors": [
{
"msg": "The 'report' parameter is missing"
}
]
}
您可以通过删除projectKey
查询参数得到了类似的错误。我尝试添加一个report
查询参数并收到了同样的错误:
http://localhost:9000/api/ce/submit?projectKey=brian3016&report=report
鉴于此,我觉得有一个与他们的代码有问题。在创建POST请求时,它应包括报表参数,但它没有这样做。
-X
开关/d:sonar.verbose=true
改变。例如。SonarScanner.MSBuild.exe开始/ K: “myProjectKey” /d:sonar.host.url="http://localhost:9000" /d:sonar.login="myLogin” /d:sonar.verbose=true
注意详细日志记录并没有给我任何有价值的信息。
(另请注意,文件说,目前使用SonarQube.Scanner.MSBuild.exe,但详细的记录告诉我切换到SonarScanner.MSBuild.exe)