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

相关推荐
lifewange8 小时前
Pycharm和IDEA中安装Cursor的方法
ide·pycharm·intellij-idea
金牛IT9 小时前
Gogs 轻量级 Git 服务器搭建与使用
运维·服务器·git
Zxxxxxy_10 小时前
测试入门:从 0 到 1 搞懂开发与 Bug
bug
Qres82119 小时前
Git安装记录
git
wj30558537821 小时前
Codex + Git 开发环境配置指南(WSL版)
linux·运维·git
misL NITL1 天前
idea、mybatis报错Property ‘sqlSessionFactory‘ or ‘sqlSessionTemplate‘ are required
tomcat·intellij-idea·mybatis
楠枬1 天前
Git 分支管理
git
奇怪的点1 天前
git clone失败
git
WaiSaa1 天前
Ubuntu配置Git免密操作
git·ubuntu·gitee
牛奶咖啡131 天前
Git实践——分支管理与标签管理及git个性化配置
git·禁用 fast forward·bug分支的创建与操作·远程分支的查看与推送·拉取仓库·推送指定分支到远程仓库·标签的创建与操作