我是Jenkins的新手,我正在尝试将其与Cucumber和Maven集成(因此我可以安排自动脚本),但每当我尝试运行构建时,都会收到以下错误:
ERROR: Failed to parse POMs
java.io.IOException: Cannot run program "/bin/java" (in directory "C:\Users\rharrigan\Documents\TestingScripts\tcwebsitelinks"): CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at hudson.Proc$LocalProc.<init>(Proc.java:245)
at hudson.Proc$LocalProc.<init>(Proc.java:214)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:846)
at hudson.Launcher$ProcStarter.start(Launcher.java:384)
at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:278)
at hudson.maven.ProcessCache.get(ProcessCache.java:236)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:798)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1728)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
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>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 13 more
[CucumberReport] Preparing Cucumber Reports
[CucumberReport] Copied 0 json files from workspace "C:\Program Files (x86)\Jenkins\workspace\CucumberTest" to reports directory "C:\Program Files (x86)\Jenkins\jobs\CucumberTest\builds\9\cucumber-html-reports\.cache"
ERROR: Build step failed with exception
java.lang.IllegalStateException: basedir C:\Program Files (x86)\Jenkins\jobs\CucumberTest\builds\9\cucumber-html-reports\.cache does not exist.
at org.apache.tools.ant.DirectoryScanner.scan(DirectoryScanner.java:879)
at net.masterthought.jenkins.CucumberReportPublisher.findJsonFiles(CucumberReportPublisher.java:148)
at net.masterthought.jenkins.CucumberReportPublisher.generateReport(CucumberReportPublisher.java:101)
at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:73)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1067)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
at hudson.model.Run.execute(Run.java:1753)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Build step 'Cucumber reports' marked build as failure
Finished: FAILURE
我们非常感谢任何想法或建议。