【BUG】记一次Maven install 报错 Could not find artifact ...:pom:0.0.1

编程入门 行业动态 更新时间:2024-10-26 04:29:54

【BUG】记一次Maven install <a href=https://www.elefans.com/category/jswz/34/1771188.html style=报错 Could not find artifact ...:pom:0.0.1"/>

【BUG】记一次Maven install 报错 Could not find artifact ...:pom:0.0.1

问题描述

创建一个maven多模块项目,执行install报错Could not find artifact …:pom:0.0.1-SNAPSHOT,然后点击clean也是报错。

原因分析:

从错误日志发现提示无法从远程maven仓库下载父模块,一看应该是哪里配置了强制从远程仓库下载。
发现子模块中pom配置如下:lookup parent from repository

<parent><groupId>com.uhu</groupId><artifactId>wework-chat</artifactId><version>0.0.1-SNAPSHOT</version><relativePath/> <!-- lookup parent from repository -->
</parent>

解决方案:

移除所有子模块中的relativePath即可,然父模块重新执行install。

<parent><groupId>com.uhu</groupId><artifactId>wework-chat</artifactId><version>0.0.1-SNAPSHOT</version>
</parent>

至此问题解决,希望对你有帮助!!

更多推荐

【BUG】记一次Maven install 报错 Could not find artifact ...:pom:0.0.1

本文发布于:2023-11-17 03:07:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1637032.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:报错   install   Maven   BUG   pom

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!