maven项目构建报错:Could not find artifact com.xxx.cloud:xxx-cloud:pom:1.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM
maven多模块项目打包的时候报错如下:
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.xxx.cloud:common:1.0-SNAPSHOT: Could not find artifact com.xxx.cloud:xxx-cloud:pom:1.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 5, column 13
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.xxx.cloud:common:1.0-SNAPSHOT (xxx\common\common\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for com.xxx.cloud:common:1.0-SNAPSHOT: Could not find artifact com.xxx.cloud:xxx-cloud:pom:1.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 5, column 13 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
找了很久原因,终于找到,这个是maven多模块项目,之前的做法是将多个模块放父级pom.xml同级下,所以没问题,现在我将模块按功能分成了三大类,放三个目录下,因此pom.xml的模块引用路径需要改一下:

1.父pom.xml引用子级模块时需要增加相对路径:

2.子模块引用parent时,需要增加以下代码(我就是少了这行所以报错,具体路径得看你子模块的pom.xml和父pom.xml差多少层目录,我的是差两层):
<relativePath>../../pom.xml</relativePath>

maven项目构建报错:Could not find artifact com.xxx.cloud:xxx-cloud:pom:1.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM的更多相关文章
- 【Maven错误】 Non-resolvable parent POM for ...... Return code is: 500 , ReasonPhrase:Internal Server Error. and 'parent.relativePath' points at no local POM @ line 14, column 11
一.异常信息 [INFO] Scanning for projects... Downloading: http://www.myhost.com/maven/jdk18/org/springfram ...
- eclipse 中导入 maven项目 启动报错
导入Maven项目到Eclipse中时,出现问题如下: java.lang.ClassNotFoundException: org.springframework.web.context.Contex ...
- Maven 项目 无缘无故报错:版本冲突,其他机器上正常-提交的时候报冲突怎么也解决不掉
2018年: maven突然之间报错了,显示版本冲突,但是其他的机器是好的, 使用命令:mvn compile -P dev -e; 看看测试环境有没有问题,还是有问题.而且,刚开始只是报错:erro ...
- maven项目update报错
MAVEN项目报错:An internal error occurred during: "Updating Maven Project" java.lang.NullPoint ...
- Idea创建maven项目,报错xxx already exists in VFS
1.问题描述: 我打算在父级maven项目中创建子级project,但是一直报错如下: 2.stackover flow中找到了问题的答案, 地址:https://stackoverflow.com/ ...
- maven项目 @Resource报错 ava.lang.NoSuchMethodError: javax.annotation.Resource.lookup()Ljava/lang/String;
@Resource 出错 java.lang.NoSuchMethodError: javax.annotation.Resource.lookup() maven项目中,使用@Resource报错. ...
- maven项目编译报错处理
1.问题一: [ERROR] Failed to execute goal on project data-common: Could not resolve dependencies for pro ...
- maven项目启动报错:SLF4J: Class path contains multiple SLF4J bindings.
SringBoot的Application启动报错: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding ...
- maven项目启动报错;class path resource [com/ssm/mapping/] cannot be resolved to URL because it does not exist
项目启动报了一堆错误,其实都是class path resource [com/ssm/mapping/] cannot be resolved to URL because it does not ...
- maven install 构建报错
错误:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin: 2.3 . 2 :compile ( default ...
随机推荐
- civil3d安装教程2022序列号和密钥
Civil3D2021 WIN10 64位安装步骤:1.先使用"百度网盘客户端"下载C3D21_CN_x64软件安装包到电脑磁盘里,并右击进行解压,安装前先断网,然后找到Autod ...
- 网络yum源下载
思路一: 按照本地网罗源,然后使用reposync直接将源同步下载到本地 wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/re ...
- 树莓派(香橙派)通过.NET IoT 操作SPI编写屏幕驱动 顺手做个四足机器人(一)
摘要 这片文章主要是记录自己的整活过程,涉及到的技术包括.NET IoT, .NET Web, .NET MAUI,框架采用的也是最新的.NET 7. 本人是用的树莓派Zero 2 W(ubuntu- ...
- 大前端系统学-了解html
标签: 使用尖括号包起来的就是标签,例如我们看到的 <html></html> 一对标签 <head> 开始标签 </head> 结束标签 < ...
- Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts.
$git push origin master 报错: Warning: Permanently added the RSA host key for IP address '192.30.253.1 ...
- MybatisPlus多表连接查询一对多分页查询数据
一.序言 在日常一线开发过程中,多表连接查询不可或缺,基于MybatisPlus多表连接查询究竟该如何实现,本文将带你找到答案. 在多表连接查询中,既有查询单条记录的情况,又有列表查询,还有分页查询, ...
- Nginx 安装篇-1.19.9版本源码安装
系统环境:CentOS 8.5 64位 [开始安装](此步骤引自网络教程) https://www.cnblogs.com/torchstar/p/16027538.html 教程比较详细,一步步操作 ...
- 【每日一题】【DFS】【BFS】【队列】2021年12月5日-199. 二叉树的右视图
解答: /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * ...
- GitHub 开源了多款字体「GitHub 热点速览 v.22.48」
本期 News 快读有 GitHub 官方大动作一下子开源了两款字体,同样大动作的还有 OpenAI 发布的对话模型 ChatGPT,引燃了一波人机对话. 项目这块,也许会成为新的 Web 开发生产力 ...
- Java开发学习(四十八)----MyBatisPlus删除语句之逻辑删除
1.逻辑删除 接下来要讲解是删除中比较重要的一个操作,逻辑删除,先来分析下问题: 这是一个员工和其所签的合同表,关系是一个员工可以签多个合同,是一个一(员工)对多(合同)的表 员工ID为1的张业绩,总 ...