Jenkins构建Maven项目时候settings.xml文件位置错误

构建报错:org.apache.maven.cli.MavenExecutionRequestsBuilderException: The specified global settings file does not exist: /var/lib/jenkins/workspace/After_Test_Project_Maven/usr/maven/apache-maven-3.5.4/conf/settings.xml

settings.xml位置应该是/usr/maven/apache-maven-3.5.4/conf/settings.xml,为什么去我项目下面找去了,是我什么地方设置不对吗

The specified global settings file does not exist
maven的全局配置路径错了。

要设置好 maven配置和你安装maven的路径,例如 如下图:

img

配置好后,就可以在自由构建项目中选择对应的setting文件