Maven:Non-resolvable parent POM: Failure to find错误

Posted 猪脚踏浪

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Maven:Non-resolvable parent POM: Failure to find错误相关的知识,希望对你有一定的参考价值。

使用Maven编译项目时遇到如下错误:

[ERROR]   The project dfjr.generic:dfjr-generic:1.0-SNAPSHOT (F:\workspace\DFJR-PERSONNEL\dfjr-generic\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Could not find artifact com.dfjr.generic:dfjr-generic-parent:pom:1.0-SNAPSHOT and ‘parent.relativePath‘ points at wrong local POM @ line 12, column 13 -> [Help 2]

由提示可知是parent.relativePath出错。解决办法如下:

    <parent>
        <groupId>com.dfjr.generic</groupId>
        <artifactId>dfjr-generic-parent</artifactId>
        <version>1.0-SNAPSHOT</version>
        <relativePath>../dfjr-generic-parent</relativePath>
    </parent>

由<relativePath>../dfjr-generic-parent</relativePath>指定正确的父pom路径,默认为../pom.xml

以上是关于Maven:Non-resolvable parent POM: Failure to find错误的主要内容,如果未能解决你的问题,请参考以下文章

Maven:Non-resolvable parent POM: Failure to find错误

Non-resolvable parent POM

连接私服仓库maven的pom文件报错:Project build error: Non-resolvable parent POM

解决Non-resolvable parent POM: Could not find artifact 出现的问题

项目构建错误:Non-resolvable parent POM: Failure to transfer org.springframework.boot:spring-boot-starter-p

Non-resolvable parent POM for com.example:dubbo:0.0.1-SNAPSHOT: Could not transfer artifact org.spri