一、网络问题
默认:中央仓库
本地 maven 配置文件:settings.xml
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
二、设置idea的指定本地MAVEN
Settings -> Build,Execution,Deployment -> Build Tools -> Maven
(必须手动亲自选取文件)
(如果不手动选取他会默认以前的文件(即使你勾选了第一个))
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Maven home path: E:(RJkaifalapache-maven-3.6.2
User settings file: E: RJkaifalapache-maven-3.6.2) conf(settings. xml——Override
Local repository: E:\ RJkaifalapache-maven-3.6.21repository——Override
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
三、pom.xml 灰色横线:导致忽略
File | Settings | Build, Execution, Deployment | Build Tools | Maven | Ignored Files
四、全部删除:lastUpdated 文件
网络差、依赖下载失败、maven 本地将会生成 lastUpdated 为后缀的文件
检索:**.lastUpdated**后缀文件——删除 lastUpdated 文件
五、设置自动导入Maven依赖
Settings -> Build,Execution,Deployment -> Build Tools -> Maven -> Importing
√ Import Maven projects automatically
√ Create IntelliJ IDEA modules for aggregator projects (with 'pom' packaging)
√ Keep source and test folders on reimport
√ Exclude build directory (%PROJECT_ROOT%/target)
√ Use Maven output directories
六、依赖子版本号要与父版本号保持一致
自己查找
前后对照
没有版本号自己添加
!!!!!!!!!!!!!!!!!!!!!