Jenkins 在成功创建项目构建后显示错误
Jenkins shows error after successful project build creating
Jenkins 在构建成功后显示错误。我已经集成了 sonarQube 用于代码分析。
我搜索了很多但没有找到任何解决方案。等待帮助:)
RROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher.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[=10=]0(SvnBlameCommand.java:45)
at org.sonar.plugins.scm.svn.SvnBlameCommand.call(SvnBlameCommand.java:91)
at org.sonar.plugins.scm.svn.SvnBlameCommand.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
这里是关键点:
Cannot run program "svn"
分析正在尝试查询您的 SCM(显然是 Subversion)以获取文件的提交数据。它没有在 运行 的 $PATH 中找到 svn
,这导致分析失败。
您的选择是使 svn
可用(首选),或者在服务器端配置项目以跳过这部分分析。
如果项目尚未创建,您需要provision。然后使用项目级管理菜单:Administration > General Settings > SCM 并将 Disable the SCM Sensor 设置为 true
。
Jenkins 在构建成功后显示错误。我已经集成了 sonarQube 用于代码分析。 我搜索了很多但没有找到任何解决方案。等待帮助:)
RROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher.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[=10=]0(SvnBlameCommand.java:45)
at org.sonar.plugins.scm.svn.SvnBlameCommand.call(SvnBlameCommand.java:91)
at org.sonar.plugins.scm.svn.SvnBlameCommand.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
这里是关键点:
Cannot run program "svn"
分析正在尝试查询您的 SCM(显然是 Subversion)以获取文件的提交数据。它没有在 运行 的 $PATH 中找到 svn
,这导致分析失败。
您的选择是使 svn
可用(首选),或者在服务器端配置项目以跳过这部分分析。
如果项目尚未创建,您需要provision。然后使用项目级管理菜单:Administration > General Settings > SCM 并将 Disable the SCM Sensor 设置为 true
。