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

相关推荐
悠然大月季28 分钟前
git 怎么导出提交历史,文件是乱码
git·git导出历史记录·git导出历史乱码
卓怡学长2 小时前
m280本科生导师指导平台
java·数据库·spring·tomcat·maven·intellij-idea
chenshiming8022 小时前
在cursor下执行GIT回退版本
git
打点计时器5 小时前
Git快速上手教程
git
我才是一卓6 小时前
linux 安装简易 git 服务端并使用
linux·运维·git
IDIOT___IDIOT8 小时前
关于 git 进行版本管理的时候 gitignore 写入忽略规则而不生效的问题
大数据·git·elasticsearch
计算机学姐8 小时前
基于SpringBoot的校园二手书籍交易系统【个性化推荐+数据可视化统计+我买到的+我卖出的】
vue.js·spring boot·后端·mysql·信息可视化·intellij-idea·mybatis
不想看见4048 小时前
Git 误删急救手册
大数据·git·elasticsearch
偷懒下载原神8 小时前
【linux操作系统】信号
linux·运维·服务器·开发语言·c++·git·后端
IT二叔8 小时前
Git Flow03-发布流程
git