我在Mac mini上使用Jenkins设置CI,但在完成所有配置后,我收到此错误:
ERROR: Failed to parse POMs
java.io.
IOException: Cannot run program "/Users/Shared/Jenkins/Home/tools/hudson.model.JDK/JDK/bin/java" (in directory "/Users/Shared/Jenkins/Home/jobs/mavenTest/workspace"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:773)
at hudson.Launcher$ProcStarter.start(Launcher.java:353)
at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:234)
at hudson.maven.ProcessCache.get(ProcessCache.java:235)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:729)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586)
at hudson.model.Run.execute(Run.java:1603)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:506)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:247)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
... 12 more
这是Android项目,应该可以使用,因为我从Maven相关网站下载了工作样本。有什么想法吗?
编辑:
在以前的行中我得到:
JDK installation skipped: Unknown CPU name: mac os x
JDK installation skipped: Unknown CPU name: mac os x
我猜这就是问题所在。我看到我不能在Mac上使用“install automaticaly JDK”,所以我必须手动完成,问题是假设路径好,返回错误/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands doesn’t look like a JDK directory
。
路径是:/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/