【记】一次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模块成功导入

相关推荐
AI大模型-小雄2 小时前
充值Codex + GPT-5.5 并发 Bug 调试实战:从时序分析到回归测试
gpt·log4j·bug
等什么秋3 小时前
idea2024下载
java·ide·intellij-idea
weixin_433417674 小时前
TortoiseGit推送到远端,如何配置
windows·git
穷人小水滴20 小时前
(科幻) 备用肉身虫 (Backup Body Bug, BBB) 系列设定 (202607 更新)
aigc·bug·科幻
Hey_Coder21 小时前
【Git 常用命令速查表(按功能分类)】
git·git基础命令·git命令速查表·git 常用命令
Java面试题总结1 天前
IntelliJ IDEA 从卡顿到起飞,只用改这些。。。
java·ide·intellij-idea
colman wang1 天前
Git指令(Mac)
git·macos
cyforkk1 天前
Git 合并分支提示 Already up to date 的真实原因
git
卓怡学长1 天前
w261springboot基于web学校课程管理系统
java·数据库·spring boot·spring·intellij-idea
●VON1 天前
HarmonyKit | 移动端开发者工具类应用的现状与趋势
git·华为·性能优化·harmonyos·鸿蒙