错误消息 parent.relativePath points at wrong local POM的处理方法

我的Maven项目遇到这样一个错误信息:

Project build error: Non-resolvable parent POM for com.sap.cloud.sample:connectivity:[unknown-version]: Failure to find com.sap.cloud.sample:sdk-samples-parent:pom:1.0.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and ‘parent.relativePath’ points at wrong local POM

分析

我的名为connectivity的Maven项目的pom.xml里定义了一个parent依赖:

但是在connectivity的上一层文件夹dis里面没有local的pom.xml, 因此Maven会报上述的错误提示。

解决方案

在当前项目的上一层文件夹dis里新建一个pom.xml, 定义sdk-samples-parent内容。

之后问题解决。

关于pom.xml parent标签的用法,参考这篇文章

要获取更多Jerry的原创技术文章,请关注公众号”汪子熙”或者扫描下面二维码:

发布了6727 篇原创文章 · 获赞 645 · 访问量 111万+
展开阅读全文

maven多模块项目,构建子模块失败

02-28

初学maven,构建多模块项目时,父模块能正常构建,子模块构建时产生如下异常: ![整体目录](https://img-ask.csdn.net/upload/201602/29/1456678246_496145.jpg) 我更新过本地仓库:D:\maven_repository,原本是没有配置parent标签的relativePath属性,eclipse自动就给出了错误提示,配了后,错误提示消失了,个人分析,“relativePath”的配置是正确的,但是还是无法正确构建成功。不知道有没有前辈有遇到过该问题或者有该情况解决办法,万望“拔刀相助”,不吝赐教,小弟这厢先谢过啦! 工作空间目录如下:![工作空间目录](https://img-ask.csdn.net/upload/201602/29/1456678259_626157.jpg) 尝试过在Eclipse中通过clean install 之执行过:![指令操作](https://img-ask.csdn.net/upload/201602/29/1456678273_91604.jpg) 构建子模块时,控制台完整的异常信息如下: [INFO] Scanning for projects... [ERROR] [ERROR] Some problems were encountered while processing the POMs: [FATAL] Non-resolvable parent POM for com.jikexueyuan:helloweb-entity:1.0-SNAPSHOT: Failure to find com.jikexueyuan:helloweb-parent:pom:1.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 5, column 11 @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project com.jikexueyuan:helloweb-entity:1.0-SNAPSHOT (D:\TrueTimeWorkspace\helloweb\modules\helloweb-entity\pom.xml) has 1 error [ERROR] Non-resolvable parent POM for com.jikexueyuan:helloweb-entity:1.0-SNAPSHOT: Failure to find com.jikexueyuan:helloweb-parent:pom:1.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 5, column 11 -> [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 问答

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 深蓝海洋 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览