码迷,mamicode.com
首页 > 其他好文 > 详细

jenkins build 报错: mvn: command not found 解决

时间:2020-06-11 16:21:50      阅读:160      评论:0      收藏:0      [点我收藏+]

标签:jenkins   free   not found   style   apach   fail   uil   http   tom   

jenkins build 报错:

[hello-world-freestyle] $ /bin/sh -xe /root/softs/apache-tomcat-9.0.35/temp/jenkins5323864766359302328.sh
+ mvn clean package
/root/softs/apache-tomcat-9.0.35/temp/jenkins5323864766359302328.sh: line 2: mvn: command not found
Build step ‘Execute shell‘ marked build as failure
Finished: FAILURE

1、查询系统环境变量: echo $PATH

  [root@VM_0_8_centos ~]# echo $PATH
  /root/jenkins_home/downloads/apache-maven-3.6.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin

 2. 在jenkins中设置环境变量:

  【系统管理】->【系统设置】->【全局属性】->【环境变量】

技术图片

 

jenkins build 报错: mvn: command not found 解决

标签:jenkins   free   not found   style   apach   fail   uil   http   tom   

原文地址:https://www.cnblogs.com/hepeng/p/13093703.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!