成功创建项目后,Jenkins显示错误

时间:2015-10-22 22:00:12

标签: java svn jenkins sonarqube

Jenkins在构建成功后显示错误。我已经集成了sonarQube进行代码分析。 我搜索了很多,但我没有找到任何解决方案。等待帮助:))

RROR: 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: java.lang.IllegalStateException: java.io.IOException: Cannot run program "svn" (in directory "C:\.jenkins\jobs\Hello\workspace"): CreateProcess error=2, The system cannot find the file specified
    at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:107)
    at org.sonar.plugins.scm.svn.SvnBlameCommand.access$000(SvnBlameCommand.java:45)
    at org.sonar.plugins.scm.svn.SvnBlameCommand$1.call(SvnBlameCommand.java:91)
    at org.sonar.plugins.scm.svn.SvnBlameCommand$1.call(SvnBlameCommand.java:88)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
Caused by: java.io.IOException: Cannot run program "svn" (in directory "C:\.jenkins\jobs\Hello\workspace"): CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    at org.sonar.api.utils.command.CommandExecutor.execute(CommandExecutor.java:76)
    at org.sonar.plugins.scm.svn.SvnBlameCommand.execute(SvnBlameCommand.java:125)
    at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:104)
    ... 8 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(ProcessImpl.java:189)
    at java.lang.ProcessImpl.start(ProcessImpl.java:133)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1021)
    ... 11 more
ERROR: 
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
Build step 'Invoke Standalone SonarQube Analysis' marked build as failure
Finished: FAILURE

1 个答案:

答案 0 :(得分:1)

这是关键位:

  

无法运行程序“svn”

分析试图查询您的SCM(显然是Subversion)以获取文件的提交数据。它没有在$ PATH中找到<section class=""> <div class="container"> <table> <thead> <tr class="header"> <th> Table attribute name <div>Table attribute name</div> </th> <th> Value <div>Value</div> </th> <th> Description <div>Description</div> </th> </tr> </thead> <tbody> <tr> <td>align</td> <td>left, center, right</td> <td>Not supported in HTML5. Deprecated in HTML 4.01. Specifies the alignment of a table according to surrounding text</td> </tr> <tr> <td>bgcolor</td> <td>rgb(x,x,x), #xxxxxx, colorname</td> <td>Not supported in HTML5. Deprecated in HTML 4.01. Specifies the background color for a table</td> </tr> <tr> <td>border</td> <td>1,""</td> <td>Specifies whether the table cells should have borders or not</td> </tr> <tr> <td>cellpadding</td> <td>pixels</td> <td>Not supported in HTML5. Specifies the space between the cell wall and the cell content</td> </tr> <tr> <td>cellspacing</td> <td>pixels</td> <td>Not supported in HTML5. Specifies the space between cells</td> </tr> <tr> <td>frame</td> <td>void, above, below, hsides, lhs, rhs, vsides, box, border</td> <td>Not supported in HTML5. Specifies which parts of the outside borders that should be visible</td> </tr> <tr> <td>rules</td> <td>none, groups, rows, cols, all</td> <td>Not supported in HTML5. Specifies which parts of the inside borders that should be visible</td> </tr> <tr> <td>summary</td> <td>text</td> <td>Not supported in HTML5. Specifies a summary of the content of a table</td> </tr> <tr> <td>width</td> <td>pixels, %</td> <td>Not supported in HTML5. Specifies the width of a table</td> </tr> </tbody> </table> </div> </section>来运行,这导致分析失败。

您的选择是使svn可用(首选),或者在服务器端配置项目以跳过此部分分析。

如果尚未创建项目,则需要provision。然后使用项目级管理菜单:管理&gt;一般设置&gt; SCM 并将禁用SCM传感器设置为svn