The project com.xx.xx has 1 error [ERROR] Non-resolvable parent POM: Could not find artifact co

执行mvn clean 命令 发现error异常,内容如下

The project com.xx.xx  has 1 error [ERROR]     Non-resolvable parent POM: Could not find artifact com.xx.xx and 'parent.relativePath' points at wrong local POM @ line x, column x.

查了下出错的module所在的POM文件,发现当前parent依赖中没有relativePath,分析该pom文件的父pom跳过了上一层。使用相对路径../../找到正确的相对路径,再试,成功!

<parent>
    <artifactId>boot</artifactId>
    <groupId>com.sb.boot</groupId>
    <version>1.0-SNAPSHOT</version>
    <relativePath>../../pom.xml</relativePath>
</parent>

猜你喜欢

转载自blog.csdn.net/ximaiyao1984/article/details/132623282