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

相关推荐
周杰伦的稻香13 小时前
[bug]npx @deepseek-ai/dsh plugin ...无限吃内存卡死
bug
卓怡学长13 小时前
w175基于springboot校园二手物品交易平台
java·spring boot·spring·maven·intellij-idea
轮到我狗叫了14 小时前
git - 版本控制工具 - 对应的常见命令 - 以及无需后续每次手动source conda
git
2601_9621229715 小时前
解决 IntelliJ IDEA 中 Tomcat 日志乱码问题的详细指南
java·tomcat·intellij-idea
demon755200315 小时前
IDEA-http-client-指南
http·intellij-idea
changxiang15 小时前
GIT 备忘
git
DogDaoDao1 天前
Windows 开发提效工具全景指南:60+ 工具的工程化分层配置
windows·git·程序员·开发工具·powershell·everything·msys2
wdfk_prog1 天前
GitHub push 失败:如何扫描并清理 Git 历史中的大文件
git·elasticsearch·github
大明二代2 天前
使用 Traefik、cert-manager 和 DNS-01 为内网 Kubernetes 服务配置 HTTPS
git·kubernetes·flux
小芒果_012 天前
git常用命令速查
大数据·git·elasticsearch