问题
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