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

相关推荐
用户3301448676334 分钟前
20 — 远程进阶:强制推送的保险绳——force-with-lease
git
Cooper251 小时前
别急着改 Git 历史:rebase、cherry-pick、bisect 与 reflog 的安全操作顺序
git
加油码2 小时前
探秘 volatile关键字:编译器的过度优化
linux·bug·信号处理
刚入门的大一新生2 小时前
Linux-版本控制器Git
git
扶苏10022 小时前
同一个 Git 项目整出两份,切分支互不影响?两种方案实测
大数据·git·elasticsearch
ZJU_统一阿萨姆2 小时前
【Git】Github 开源许可证详解
git·开源·github
鹿屿二向箔3 小时前
keil5.39版本使用AC6编译器不能位域操作的BUG使用STM32U385系列MCU
stm32·单片机·bug
angryshan15 小时前
goLang配置断点流程
go·bug
Geek-Chow1 天前
Git 标签与发布流程:轻量标签、附注标签与签名标签
git·tags
wear工程师1 天前
Git 冲突怎么解决:别只删标记,先看懂暂存区的 1、2、3 阶段
git