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

相关推荐
啥都不懂的小小白3 小时前
Git 入门指南:从零开始掌握版本控制
git
AI逐月3 小时前
Git 彻底清除历史记录
大数据·git·elasticsearch
有什么东东4 小时前
Windows安装git教程以及初步使用
git
不爱吃米饭_4 小时前
Gitea 轻量级的Git方案 - Gitlab的替代品
git·gitlab·gitea
测试19987 小时前
一个只能通过压测发现Bug
自动化测试·软件测试·python·selenium·测试工具·bug·压力测试
CoderJia程序员甲7 小时前
GitHub 热榜项目 - 日榜(2025-12-15)
git·ai·开源·llm·github
大柏怎么被偷了8 小时前
【Git】远程操作
git
studytosky8 小时前
Linux 基础开发工具(3):Git 控制与 GDB 调试实用指南
linux·运维·服务器·网络·数据库·git
云闲不收10 小时前
AI编程系列——git-worktree并行开发
git·ai编程
秦时明月天明10 小时前
GitLab SSH Key 过期:git pull failed : remote your ssh key has expired
git·ssh·gitlab