我已经在cmd中手动编译了maven,并且成功。 但是,当我尝试执行詹金斯工作时,是说
"'mvn' is not recognized as an internal or external command,
operable program or batch file."
Jenkins控制台输出:
enter code hereStarted by user prakash peram
在工作空间C:\ Program Files(x86)\ Jenkins \ workspace \ atmosphere3中构建
git.exe rev-parse --is-inside-work-tree#timeout = 10 从远程Git存储库中获取更改 git.exe config remote.origin.url https://github.com/g0t4/jenkins2-course-spring-boot.git#timeout = 10 从https://github.com/g0t4/jenkins2-course-spring-boot.git获取上游更改 git.exe --version#超时= 10 git.exe fetch --tags --progress https://github.com/g0t4/jenkins2-course-spring-boot.git + refs / heads / :refs / remotes / origin / git.exe rev-parse“ refs / remotes / origin / master ^ {commit}”#超时= 10 git.exe rev-parse“ refs / remotes / origin / origin / master ^ {commit}”#超时= 10 检出修订版4bde91e33e2860b2aab142028c04eff37b7791f2(引用/远程处理/来源/主文件) git.exe配置core.sparsecheckout#timeout = 10 git.exe检出-f 4bde91e33e2860b2aab142028c04eff37b7791f2 提交消息:“增加jacoco代码覆盖率” git.exe rev-list --no-walk 4bde91e33e2860b2aab142028c04eff37b7791f2#timeout = 10 [atmosphere3] $ cmd.exe / C“ mvn -f spring-boot-samples / spring-boot-sample-atmosphere / pom.xml编译&&退出%% ERRORLEVEL %%” 无法将“ mvn”识别为内部或外部命令, 可操作的程序或批处理文件。 构建步骤“调用顶级Maven目标”将构建标记为失败 完成:失败
我已经在环境变量中设置了MVN_HOME和M2_HOME。
如果需要,请寻求其他信息。