解决IntelliJ IDEA maven库下载依赖包速度慢的问题
在pom.xml中添加maven 依赖包时,下载速度都好慢,就1M的东西能下半天,很是苦恼,于是到网上搜资料,然后让我查到了。说是使用阿里的maven镜像就可以了。我于是亲自试了下,速度快的飞起!!!
右键项目选中maven选项,然后选择“open settings.xml”或者 “create settings.xml”,然后把如下代码粘贴进去就可以了。重启IDE,感受速度飞起来的感觉吧!!!
<?xml version="1.0" encoding="UTF-8"?> <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <mirrors> <!-- mirror | Specifies a repository mirror site to use instead of a given repository. The repository that | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used | for inheritance and direct lookup purposes, and must be unique across the set of mirrors. | <mirror> <id>mirrorId</id> <mirrorOf>repositoryId</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://my.repository.com/repo/path</url> </mirror> --> <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> <mirror> <id>uk</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://uk.maven.org/maven2/</url> </mirror> <mirror> <id>CN</id> <name>OSChina Central</name> <url>http://maven.oschina.net/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> <mirror> <id>nexus</id> <name>internal nexus repository</name> <!-- <url>http://192.168.1.100:8081/nexus/content/groups/public/</url>--> <url>http://repo.maven.apache.org/maven2</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors> </settings>
以上这篇解决IntelliJ IDEA maven库下载依赖包速度慢的问题就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。
相关文章
服务器封UDP和封国外是什么意思? 封UDP和封海外云服务器选择!
很多人在租用高防云服务器的时候,都会看到关于防御会有介绍是否封国外、封UDP,封海外就是封住海外的攻击,而封UDP则使UDP攻击无效,所以防御上面封UDP的机器比不封UDP的要强一些,下面给大家简单介绍一下封UDP和封国外是什么意思,有什么用2023-05-05
阿里云主机不能用IP访问网站的解决方法(配置安全组规则搞定)
刚买了一台阿里云主机,迫不待及的试试速度,怎知网站访问不了,用IP或绑定域名都无法访问,后来提交工单才知道,需要配置安全组规则才行。针对同样像我一样的新手,本文就介绍一下如何在开通阿里云主机后配置安全组规则,让网站能够外网访问,需要的朋友可以参考下2020-07-07
cwrsync invalid uid nobody 解决方法
这篇文章主要介绍了使用rsync/cwrsync工具进行档案同步的时候出现invalid uid nobody错误的解决方法,需要的朋友可以参考下2016-03-03
Ubuntu18.04本地化部署Rustdesk服务器的详细过程
如果你是想数据留在本地,那么Rustdesk这个工具可以考虑,它是开源的,部署起来也简单,下面通过本文给大家分享Ubuntu18.04本地化部署Rustdesk服务器的详细过程,感兴趣的朋友跟随小编一起看看吧2024-04-04


最新评论