当前位置: 动力学知识库 > 问答 > 编程问答 >

sonarqube - When i am trying to configur sonar in windows i am getting the task execurion error

问题描述:

I am using Sonar-Qube-5.5 and Sonar-Runner-2.4. These are configuration that we have access to use. We need to do the set-up in each and every local system.

Added the logs for reference.

D:\sonar\sonar-runner-2.4\bin>sonar-runner D:\sonar\soanr_ws\FirstSonarProject -X

D:\sonar\sonar-runner-2.4\bin\..

SonarQube Runner 2.4

Java 1.7.0_79 Oracle Corporation (64-bit)

Windows 7 6.1 amd64

INFO: Error stacktraces are turned on.

INFO: Runner configuration file: D:\sonar\sonar-runner-2.4\bin\..\conf\sonar-runner.properties

INFO: Project configuration file: NONE

INFO: SonarQube Server 5.5

09:52:01.484 DEBUG - Publish global mode

09:52:01.562 DEBUG - cache: C:\Users\tcs_ban214.HDFCSLDM\.sonar\ws_cache\http%3A%2F%2Flocalhost%3A9000\global

09:52:01.718 INFO - Load global repositories

09:52:01.781 DEBUG - GET 200 http://localhost:9000/batch/global | time=63ms

09:52:01.859 INFO - Load global repositories (done) | time=141ms

09:52:01.890 INFO - User cache: C:\Users\tcs_ban214.HDFCSLDM\.sonar\cache

09:52:02.217 INFO - Load plugins index

09:52:02.217 DEBUG - GET 200 http://localhost:9000/deploy/plugins/index.txt | time=0ms

09:52:02.217 INFO - Load plugins index (done) | time=0ms

09:52:02.217 DEBUG - Load plugins

09:52:02.249 DEBUG - Load plugins (done) | time=32ms

09:52:02.249 DEBUG - API compatibility mode is enabled on plugin Git [scmgit] (built with API lower than 5.2)

09:52:02.264 DEBUG - API compatibility mode is enabled on plugin JavaScript [javascript] (built with API lower than 5.2)

09:52:02.264 DEBUG - API compatibility mode is enabled on plugin SVN [scmsvn] (built with API lower than 5.2)

09:52:02.264 DEBUG - API compatibility mode is enabled on plugin Java [java] (built with API lower than 5.2)

09:52:02.280 DEBUG - API compatibility mode is enabled on plugin C# [csharp] (built with API lower than 5.2)

09:52:02.373 DEBUG - Plugins:

09:52:02.373 DEBUG - * Git 1.2 (scmgit)

09:52:02.373 DEBUG - * JavaScript 2.11 (javascript)

09:52:02.373 DEBUG - * SVN 1.3 (scmsvn)

09:52:02.373 DEBUG - * Java 3.13.1 (java)

09:52:02.373 DEBUG - * C# 5.0 (csharp)

INFO: ------------------------------------------------------------------------

INFO: EXECUTION FAILURE

INFO: ------------------------------------------------------------------------

Total time: 1.732s

Final Memory: 3M/91M

INFO: ------------------------------------------------------------------------

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: Task 'D:\sonar\soanr_ws\FirstSonarProject' does not exist. Please use 'list' task to see all available tasks.

D:\sonar\sonar-runner-2.4\bin>

网友答案:

You incorrectly executed the sonar-runner tool. You should execute command in directory where your project is located, example:

cd D:\sonar\soanr_ws\FirstSonarProject

D:\sonar\sonar-runner-2.4\bin\sonar-runner -X

Here is a whole documentation about how to execute sonar-runner from command line: http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner

分享给朋友:
您可能感兴趣的文章:
随机阅读: