我在我的 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 上使用“自动安装 JDK”,所以我必须手动完成,问题是应该是好的路径,返回错误/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands doesn’t look like a JDK directory
。路径是:/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/