ERROR: A Maven installation needs to be available for this project to be built.Either your server has no Maven installations defined, or the requested Maven version does not exist. Email was triggered for: Failure - Any Sending email for trigger: Failure - Any Error retrieving environment vars: A Maven installation needs to be available for this project to be built.Either your server has no Maven installations defined, or the requested Maven version does not exist. An attempt to send an e-mail to empty list of recipients, ignored. Finished: FAILURE
查看云服务器上的Maven是否安装配置成功
mvn -version
报错信息
在 /etc/profile文件中加入两行代码
export MAVEN_HOME=/usr/local/maven/apache-maven-3.8.6
export PATH=${MAVEN_HOME}/bin:${PATH}
使环境参数生效:source /etc/profile
重新输入mvn -version
确定Jenkins中maven配置正确