如何解决Maven依赖无法导入的问题
更新时间:2024年10月04日 10:00:12 作者:zhuanjialin
本文介绍了如何通过在setting.xml中配置仓库坐标和在IntelliJ IDEA中进行相关设置来提高Maven下载Jar包的速度,首先在setting.xml中找到mirrors标签进行配置,然后在IntelliJ IDEA的设置中输入特定的命令
解决Maven依赖无法导入
1.在setting,xml中找到mirrors标签
在mirrors标签中配置这几个仓库坐标
<mirrors> <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> <mirror> <id>junit</id> <name>junit Address/</name> <url>http://jcenter.bintray.com/</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors>
2.打开intellj idea
选择File ->Settings -> Build, Execution, Deployment
-> Build Tools -> Maven -> Importing

在VM options for importer一栏中输入
-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true

3.点击Apply
再点击OK
4.选择
Maven->Excute Maven goal
5.输入
clean install -e -U 运行maven


然后项目就ok啦
总结
以上为个人经验,希望能给大家一个参考,也希望大家多多支持脚本之家。
相关文章
Struts1教程之ActionMapping_动力节点Java学院整理
这篇文章主要介绍了Struts1教程之ActionMapping,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧2017-09-09
详解Spring 框架中切入点 pointcut 表达式的常用写法
这篇文章主要介绍了详解Spring 框架中切入点 pointcut 表达式的常用写法,具有一定的参考价值,感兴趣的小伙伴们可以参考一下2017-04-04
详解spring boot 以jar的方式启动常用shell脚本
本篇文章主要介绍了详解spring boot 以jar的方式启动常用shell脚本,具有一定的参考价值,有兴趣的可以了解一下2017-09-09
springboot集成普罗米修斯(Prometheus)的方法
这篇文章主要介绍了springboot集成普罗米修斯(Prometheus)的方法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧2020-08-08


最新评论