Sonars跑步者执行失败,詹金斯

时间:2015-12-01 09:58:01

标签: maven jenkins

我正在使用带有maven项目的Sonar Runner。 当我使用cmd作为"声纳 - 跑步者"运行时,情况正常。

然而,当我使用Jenkins" Post Step"功能,我得到以下错误。 请指教。

Waiting for Jenkins to finish collecting data
[JENKINS] Archiving D:\software\sonar-runner-dist-2.4\sonar-runner-2.4\DFServer\pom.xml to DFTK/DFTK/8/DFTK-8.pom
channel stopped
[workspace] $ D:\software\sonar-runner-dist-2.4\sonar-runner-2.4\bin\sonar-runner.bat DFServer -Dsonar.host.url=http://localhost:9000/ ******** ******** -Dsonar.projectBaseDir=C:\Users\ravi13341\.jenkins\jobs\DFServer\workspace -Dproject.settings=D:\software\sonar-runner-dist-2.4\sonar-runner-2.4\DFServer\sonar-project.properties -Dsonar.language=java -Dsonar.projectName=D:\sonar_test\DFServer -Dsonar.projectVersion=1.0 -Dsonar.binaries=D:\software\sonarqube-5.2\lib -Dsonar.sourceEncoding=UTF-8 -Dsonar.projectKey=org.sonarqube:java-sonar-runner-simple -Dsonar.sources=D:\software\sonar-runner-dist-2.4\sonar-runner-2.4\DFServer\src
D:\software\sonar-runner-dist-2.4\sonar-runner-2.4
SonarQube Runner 2.4
Java 1.7.0_02 Oracle Corporation (32-bit)
Windows 7 6.1 x86
INFO: Runner configuration file: D:\software\sonar-runner-dist-2.4\sonar-runner-2.4\conf\sonar-runner.properties
INFO: Project configuration file: D:\software\sonar-runner-dist-2.4\sonar-runner-2.4\DFServer\sonar-project.properties
INFO: SonarQube Server 5.2
15:14:36.803 INFO  - Load global repositories
15:14:36.927 INFO  - Load global repositories (done) | time=109ms
15:14:36.943 INFO  - User cache: C:\Users\ravi13341\.sonar\cache
15:14:37.255 INFO  - Load plugins index
15:14:37.271 INFO  - Load plugins index (done) | time=16ms
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 1.144s
Final Memory: 3M/71M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: Tasks are no more supported on batch side since SonarQube 5.2
ERROR: 
ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
Build step 'Invoke Standalone Sonar Analysis' marked build as failure
Skipping sonar analysis due to bad build status FAILURE
Finished: FAILURE

控制台截图:

[Console screenshot]

1 个答案:

答案 0 :(得分:0)

您应该省略声纳 - 跑步者呼叫的DFServer属性。

另请参阅此处有关SO的说明:Tasks are no more supported on batch side since SonarQube 5.2