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的更多相关文章

  1. 【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 ...

  2. eclipse 中导入 maven项目 启动报错

    导入Maven项目到Eclipse中时,出现问题如下: java.lang.ClassNotFoundException: org.springframework.web.context.Contex ...

  3. Maven 项目 无缘无故报错:版本冲突,其他机器上正常-提交的时候报冲突怎么也解决不掉

    2018年: maven突然之间报错了,显示版本冲突,但是其他的机器是好的, 使用命令:mvn compile -P dev -e; 看看测试环境有没有问题,还是有问题.而且,刚开始只是报错:erro ...

  4. maven项目update报错

    MAVEN项目报错:An internal error occurred during: "Updating Maven Project" java.lang.NullPoint ...

  5. Idea创建maven项目,报错xxx already exists in VFS

    1.问题描述: 我打算在父级maven项目中创建子级project,但是一直报错如下: 2.stackover flow中找到了问题的答案, 地址:https://stackoverflow.com/ ...

  6. maven项目 @Resource报错 ava.lang.NoSuchMethodError: javax.annotation.Resource.lookup()Ljava/lang/String;

    @Resource 出错 java.lang.NoSuchMethodError: javax.annotation.Resource.lookup() maven项目中,使用@Resource报错. ...

  7. maven项目编译报错处理

    1.问题一: [ERROR] Failed to execute goal on project data-common: Could not resolve dependencies for pro ...

  8. maven项目启动报错:SLF4J: Class path contains multiple SLF4J bindings.

    SringBoot的Application启动报错: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding ...

  9. 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 ...

  10. maven install 构建报错

    错误:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin: 2.3 . 2 :compile ( default ...

随机推荐

  1. 金山云:基于 JuiceFS 的 Elasticsearch 温冷热数据管理实践

    01 Elasticsearch 广泛使用带来的成本问题 Elasticsearch(下文简称"ES")是一个分布式的搜索引擎,还可作为分布式数据库来使用,常用于日志处理.分析和搜 ...

  2. windows10 ftp文件夹错误

    遇到问题: 解决办法: 1. cmd直接访问 ftp ip 2. 启用tftp client 从文件夹访问 注直接访问会弹出如之前报错一样的失败:ftp://ip ftp://用户:密码@ip 使用如 ...

  3. 简单的sql注入1

    首先查看源码找找思路 发现源码里什么都没有 再使用bp拦截下数据 多次拦截后发现我们在 输入框里输入的等下就是id= 意思是我们这里就可以直接使用get注入了 好像类似于sql-labs上的?id= ...

  4. cv2.imread opencv读取不到图片问题

    解决办法 cv2.imread 路径中包含中文,改为英文 其他 这个问题解决了很久,都属于库的问题

  5. [信息抽取]基于ERNIE3.0的多对多信息抽取算法:属性关系抽取

    [信息抽取]基于ERNIE3.0的多对多信息抽取算法:属性关系抽取 实体关系,实体属性抽取是信息抽取的关键任务:实体关系抽取是指从一段文本中抽取关系三元组,实体属性抽取是指从一段文本中抽取属性三元组: ...

  6. 【Spark】Day02:Spark-Core:RDD概述、RDD编程(转换算子、Action)、序列化、依赖关系、持久化、数据读取保存、累加器、广播变量、top10、转化率

    总结:https://www.cnblogs.com/qingyunzong/p/8899715.html 一.RDD概述 1.引入:IO流 按行.按字节.字节缓冲 调用read方法读取流,均为惰性加 ...

  7. Jmeter ForEach 循环控制器

    ForEach Controller 即循环控制器,顾名思义是定义一种循环规则,如下图: 1.名称:控制器名称,可根据用户需要任意填写,也可不填 2.注释:用户可根据需要任意填写,也可不填 3.输入变 ...

  8. java Jdbc 简单方法

    1.注册驱动(第一种方法) Class.forName(com.mysql.jdbc.Driver"); 2.获得连接DriverManager.getConnection(url,user ...

  9. error: expected ‘)’ before ‘PRIx64’

    打印uint64时编译报错 printf("prefix:0x%"PRIx64"\n",ipv6Prefix); 解决办法:添加头文件 #include < ...

  10. Vue前后端分离实现登录的一个简单demo

    1.建立一个Maven项目,并添加Spring相关依赖 2.编写Controller类相应的接口和配置类 LoginController类,编写接口的业务逻辑 package com.springbo ...