【记】一次common模块导入无效的bug

首先Maven clean install无用

然后idea清除缓存重启无用

pom.xml文件重载无效

正确解决路径:

1.检查common模块的父工程导入和自身模块的声明是否正确

默认是继承父工程的groupid,可以不用再声明

2.检查子工程是否引入正确的common,org不要写成ogr了

3.修改完所有的common模块相关声明然后父工程clean报version缺失错误

ERROR The project org.mumu:comsumer:1.0 (D:\学习\javacode\eureka\consumer\pom.xml) has 6 errors ERROR 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-web:jar is missing. @ line 23, column 21 ERROR 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-actuator:jar is missing. @ line 27, column 21 ERROR 'dependencies.dependency.version' for org.springframework.boot:spring-boot-devtools:jar is missing. @ line 31, column 21

如果是父工程管理了版本那么子工程是可以不用声明version的,此时去检查父工程的pom

检查子模块、groupid等信息

检查properties是否正常,不能爆红,复制粘贴注意只能有一个properties

检查版本管理,注意这里是dependencyManagement、dependencies、dependency三个标签

至此重新clean install,common模块成功导入

相关推荐
sunshine22 girl8 小时前
Java学习一 环境配置2 安装和基本使用Idea
java·学习·intellij-idea
策案案案11 小时前
YOLO: 将AI Agents嵌入到IntelliJ IDEA
java·大数据·人工智能·笔记·yolo·microsoft·intellij-idea
卓怡学长14 小时前
w210基于springboot反诈平台设计与实现
java·spring boot·spring·intellij-idea
那年窗外下的雪.16 小时前
AIDC 学习日志|第 21 天|EVPN 多归属故障演练与中断窗口定位
网络·git·学习
卓怡学长18 小时前
w156一周穿搭App的设计与实现
java·spring boot·spring·maven·intellij-idea
玖石书19 小时前
Git Submodule 完全指南:从添加到日常维护的常规操作全流程
大数据·git·elasticsearch
微尘寒风1 天前
git创建版本库
git
console.log('npc')1 天前
Git 冲突与 AI 协助指南
前端·人工智能·git·大模型
重生之我来学Python2 天前
Git-SVN 混合开发,从入门到精通!
开发语言·git·svn·github
笨笨饿2 天前
#137_死机恢复现场_Armino平台AP系统swd调试
git·python·stm32·单片机·嵌入式硬件·物联网·vim