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

相关推荐
___波子 Pro Max.11 小时前
Git Remote 仓库地址变更
git
乐之者v15 小时前
AI编程 -- codex添加代码,在intellij Idea中没有显示,如何处理?
java·ide·intellij-idea
ModestCoder_16 小时前
Git 忽略所有 `.xlsx`,但保留指定 Excel 文件的方法
git·excel
阡陌..17 小时前
202605新版git_2.54.0常用操作指令
大数据·git·elasticsearch
会笑的小熊18 小时前
VScode项目推送到git仓库
ide·git·vscode
zhangfeng113318 小时前
宝塔服务器完全可以安装 Git,进行版本管理,而且非常简单
运维·服务器·人工智能·git·编程
Bdygsl20 小时前
Git(1)—— 基本理解与使用
git
JiaWen技术圈21 小时前
增量静态再生(ISR)详解:Next.js 中的实现与应用
javascript·git·ubuntu
boonya1 天前
Idea CC GUI插件如何通过 CC Switch 工具将 Claude Code 的后端配置为 DeepSeek 的 v4-pro 模型?
java·ide·intellij-idea
The Chosen One9851 天前
【Linux】深入理解Linux进程(二):进程的状态
linux·运维·服务器·开发语言·git