自 SonarQube 5.2 起,批处理端不再支持任务 [英] Tasks are no more supported on batch side since SonarQube 5.2
问题描述
我安装了 SonarQube 5.2 和 Sonar-runner 2.4(最新版本).我设法启动了 SonarQube,但在尝试运行 Sonar-runner 时出现以下错误:
I install SonarQube 5.2 and Sonar-runner 2.4 (latest versions). I managed to start SonarQube but I get the following error when trying to run Sonar-runner:
ERROR: Unable to execute Sonar
ERROR: Caused by: Tasks are no more supported on batch side since SonarQube 5.2
ERROR:
当我使用 --debug 运行命令时引发以下异常
The following exception is thrown when I run the command with --debug
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:100)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:53)
Caused by: Tasks are no more supported on batch side since SonarQube 5.2
是否需要更改任何配置才能分析项目?
It is there any configuration that should be changed to be able to analyze a project?
谢谢
推荐答案
你必须从项目基目录执行sonar-runner.所以
You must execute sonar-runner from the project base directory. So
cd my/project/base/dir
sonar-runner
编辑
sonar-runner
的基本假设是您在 您希望它完成工作的目录中调用它.它曾经采用的唯一参数*是要执行的任务",但不再支持这些.
The base assumption with sonar-runner
is that you're invoking it in the directory where you want it to do its work. The only arguments* it ever took were "tasks" to be performed, but those are no longer supported.
*请注意,您可以在命令行上定义要在分析期间使用的 (-D) 参数.
*Note that you can define (-D) parameters to be used during analysis on the command line.
这篇关于自 SonarQube 5.2 起,批处理端不再支持任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!