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

相关推荐
一叶飘零_sweeeet15 分钟前
IDEA 插件 Trae AI 最新全攻略(基于 TRAE AI: Coding Assistant 1.7.0.0)
java·intellij-idea·trae
卓怡学长2 小时前
w268基于springboot + vue 物流系统
java·数据库·vue.js·spring boot·spring·intellij-idea
鲸~屿3 小时前
Git上传本地文件到GitHub教学指南
git·github
卓怡学长18 小时前
w269基于spring boot + vue 候鸟监测数据管理系统
java·数据库·spring boot·spring·intellij-idea
减瓦1 天前
Windows 环境使用 Git Bash 最佳实践
windows·git
史呆芬1 天前
CodeX多仓库提交Skill搭建
git·后端·openai
城东1 天前
Git使用[原意要新建分支提交但是误提交到原来分支恢复办法]
git·原意要新建分支提交·但是误提交到原来分支
开发者联盟league1 天前
git 压缩本地最近多个commit
git
赵庆明老师1 天前
Vben精讲:04-了解VSCode中的Git
ide·git·vscode