解决Maven异常 parent.relativePath' of POM.......


异常信息:

parent.relativePath' of POM io.renren:renren-fast:3.0.0 (D:\Code\gulimall\renren-fast\pom.xml) 
points at com.atguigu.gulimall:gulimall instead of org.springframework.boot:spring-boot-starter-parent,
please verify your project structure

问题原因:

因为我是直接拖了一个单一的springboot的项目文件到我的总项目里面,并且在最外层的pom的modouls加入了该项目

由于parent里写的并不是xxx的上一级,而是继承了springboot:

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.6.RELEASE</version>
    </parent>

所以加上:

<relativePath />

问题解决:

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.6.RELEASE</version>
        <relativePath />
    </parent>

 

转自:https://blog.csdn.net/weixin_42649056/article/details/109350851


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM