zl程序教程

您现在的位置是:首页 >  工具

当前栏目

问题记录:jenkins构建时报错The goal you specified requires a project to execute but there is no POM in...

Jenkins to in The 构建 记录 is No
2023-09-27 14:25:55 时间

jenkins构建时报错:The goal you specified requires a project to execute but there is no POM in this directory (/var/jenkins_home/workspace/jeecg-boot_master). Please verify you invoked Maven from the correct directory
在这里插入图片描述

正常情况下,我们创建项目的时候,习惯性的把pom.xml文件存放在根目录下,如果没有放到根目录下,jenkins找不到pom.xml文件就会报错

解决:在Jenkinfile中mvn打包时添加存在pom.xml文件的路径即可