idea中maven项目无法下载,识别,解析相关依赖
1.检查settings.xml中阿里云镜像配置(如果设置了阿里云镜像)。
2.缓存问题,file—-seetings——-invalidatecaches。
3.maven clean————-maven install,之后可reimport maven。
4.相关依赖的版本问题,可能pom.xml配置文件中相关dependency的版本已经消失,去maven仓库官网https://mvnrepository.com/https://mvnrepository.com/
检查报错的相关包的版本在maven仓库中是否存在。如果不存在,则在pom.xml中更改为相关包存在的依赖版本;或者找到旧版本的相关包手动拷贝到idea中本地配置的maven仓库对应路径的文件夹下。之后刷新,build。
5.网络问题,更换下网络再次刷新尝试。
6.file—-seetings—-maven—-Runner中设置VM options():
-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true
同时在file—-seetings—-maven—-importing中设置VM options():
-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true
之后刷新,build。
还没有评论,来说两句吧...