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. JAVA 用分苹果来理解本题

    思路 其实这是一道非常经典的分苹果问题:有m个一样的苹果和n个一样的盘子,把苹果放盘子里,每个盘子允许0-m个苹果,求问有多少种分法? 与本题的共通之点在于,输入的正整数可以看成m个苹果,拆分出的加数 ...

  2. vue脚手架安装及依赖

    一.安装Vue Cil (脚手架) 需要先安装node.js,这是node官网地址: https://nodejs.org/en/download/ ,node有两种版本一种是稳定版一种开发版 安装完 ...

  3. C++两种方法改变输出颜色

    方法一: 使用 SetConsoleTextAttribute    需要引入 #include "windows.h"    SetConsoleTextAttribute(Ge ...

  4. 关于 python 的内存机制

    先看一段代码 L = [1,2,3] dic_ = {} L2 = [] for i in L: dic_['sn'] = i L2.append(dic_) print(L2) 输出 [{'sn': ...

  5. thinkphp6文件上传自定义命名规则

    think官方自带的命名规则有三种 规则 描述 date 根据日期和微秒数生成 md5 对文件使用md5_file散列生成 sha1 对文件使用sha1_file散列生成 其中md5和sha1规则会自 ...

  6. Linux 基础-文件权限与属性

    一,文件类型 1.1,概述 1.2,正规文件(regular file) 1.3,目录(directory) 1.4,链接文件(link) 1.5,设备与装置文件(device) 1.6,资料接口文件 ...

  7. C++编程笔记(GPU并行编程)

    目录 一.配置并使用 二.代码 三.内存管理 数组的分配 一.配置并使用 环境:Windows10 + CLion + VS2019 cuda的安装,并行的话只需要安装cuda,cuDNN就不必了 编 ...

  8. 【PostgreSQL】pgsql编写函数实现批量删除数字结尾的备份表

    执行前: 最终代码: CREATE OR REPLACE FUNCTION "ap"."iter_drop_table_bak"() RETURNS " ...

  9. 【每日一题】【快速排序过程、循环过程无=、递归参数】2022年1月16日-NC140 排序

    快速排序 对时间复杂度和空间复杂度有要求 方法1:快速排序-递归 import java.util.*; public class Solution { /** * 代码中的类名.方法名.参数名已经指 ...

  10. C++日期和时间编程总结

    一,概述 二,C-style 日期和时间库 2.1,数据类型 2.2,函数 2.3,数据类型与函数关系梳理 2.4,时间类型 2.4.1,UTC 时间 2.4.2,本地时间 2.4.3,纪元时间 2. ...