Tasks are no more supported on batch side since SonarQube 5.2

混江龙づ霸主 提交于 2019-12-24 00:43:51

问题


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:

EDIT: 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?

Thank you


回答1:


You must execute sonar-runner from the project base directory. So

cd my/project/base/dir
sonar-runner

EDIT

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.

*Note that you can define (-D) parameters to be used during analysis on the command line.



来源:https://stackoverflow.com/questions/33528873/tasks-are-no-more-supported-on-batch-side-since-sonarqube-5-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!