最近在学习 jenkins,看的书是 jenkins 权威指南。按照书中介绍的操作步骤,完成了 jenkins 的环境搭建。但是在构建第一个任务(game of life)时报错。clone github 上的 master 代码,没做任何改动,报错信息如下:
[GameOfLife-default] $ mvn clean package
FATAL: command execution failed
java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
Caused: java.io.IOException: Cannot run program "mvn" (in directory "/Users/Shared/Jenkins/Home/workspace/GameOfLife-default"): error=2, No such file or directory