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

相关推荐
鬼手点金28 分钟前
如何选择模型
java·前端·人工智能·git·深度学习
余槐i30 分钟前
Claude Code Skills 放对目录却不生效:插件启用顺序与缓存的三个坑
git·开发工具·ai agent·mcp·claude code
鬼手点金1 天前
Harness 工程:模型之外的竞争力
服务器·人工智能·深度学习·机器学习·bug
程序员差不多先生1 天前
Anthropic 用 5 个月重写了 Git:当 AI Agent 把版本控制系统逼到墙角
人工智能·git·elasticsearch·deepseek v4 pro·kimi k3·glm 5.3·qwen3.7 max
leo_厉锵1 天前
GIT习题
git
一只笨菜鸟1 天前
IDEA如何让多个项目同时显示
java·ide·intellij-idea
catoop2 天前
用 Shell 包装函数,让单个命令拥有专属配置
git
Zguigo2 天前
学会更高效的理解AI的输出?
人工智能·git·ai
鬼手点金2 天前
上下文:Agent 的眼睛
java·前端·人工智能·git·深度学习
巴巴媛6662 天前
【Debug1】程序死机,while(1)循环,怎么办?
c语言·笔记·stm32·嵌入式硬件·bug