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

相关推荐
Cx330_FCQ9 小时前
Tmux使用
服务器·git·算法
xxwl58516 小时前
Git 完整学习笔记:从入门到团队协作
笔记·git·学习
John_ToDebug19 小时前
Git 工作区、暂存区、仓库、远端同步完全指南:从 restore、reset 到 fetch、pull 的正确使用姿势
git·源代码管理
Tattoo_Welkin20 小时前
IDEA 中常用操作记载
java·elasticsearch·intellij-idea
Listen·Rain21 小时前
用AI开发出一个AI
java·人工智能·spring boot·tomcat·intellij-idea·mybatis·visual studio
炸膛坦客1 天前
Git 和 GitHub:(九)修改本地仓库内容并推送到远程仓库(关联/克隆)
git·github
To_OC1 天前
一次 git reset 翻车,让我彻底分清了 hard 和 soft,也想通了 Vibe Coding 的本质
git·程序员·vibecoding
Ai拆代码的曹操1 天前
Git 集成:AI 代理中的版本控制工作流设计
大数据·git·elasticsearch
lazy H1 天前
Git clone 怎么用?克隆项目及常见问题完整教程
大数据·git·后端·学习·搜索引擎·github
m0_743697592 天前
关于ftp与SELinux的冲突问题
git·github