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

相关推荐
_君莫笑2 小时前
大厂Git使用规范
git
无心水9 小时前
【Hermes:安全、权限与生产环境】39、智能体也会犯错?Hermes 纠错、回滚与遗忘机制全指南 —— 让 AI 的错误像 Git 一样可逆可控
人工智能·git·安全·mcp协议·openclaw·hermes·honcho
南境十里·墨染春水13 小时前
linux学习进展 git详解
linux·git·学习
zhangfeng113314 小时前
CodeBuddy ai对话框上面的git docs terminal Rulds 干嘛用的,以thinkphp fastadmin 为例,插件市场
人工智能·git·编程
OYangxf15 小时前
Git Conflict Resolution
大数据·git·elasticsearch
高斯林.神犇15 小时前
Git全套流程
git
WL_Aurora16 小时前
IDEA + Maven 环境配置超详细教程(图文详解)
java·maven·intellij-idea
蜡台16 小时前
idea 配置 vue 运行命令时, scripts 一栏始终为空
前端·vue.js·intellij-idea
次元工程师!17 小时前
LangFlow开发(一)—安装和部署
git·python·大模型·langflow
怣疯knight17 小时前
【无标题】
git