关于maven下载慢的问题,
分享于 点击 6510 次 点评:180
关于maven下载慢的问题,
目录
- maven下载慢问题
- 1、使用统一的maven组件
- 2、idea中配置如图
- 3、编辑settings.xml
- 4、重启idea
- 总结
maven下载慢问题
1、使用统一的maven组件
将maven安装到系统中
maven安装请自行百度
2、idea中配置如图
3、编辑settings.xml
直接将下面代码粘贴进去即可,原理是换到阿里服务器
<?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>
4、重启idea
检查配置是否生效,如果生效,点击maven重新加载所有库
总结
以上为个人经验,希望能给大家一个参考,也希望大家多多支持3672js教程。
您可能感兴趣的文章:- 解决IDEA中Maven下载依赖包过慢或报错的问题
- idea配置maven环境时maven下载速度慢的解决方法
- IDEA项目中配置Maven镜像源(下载源)的详细过程
- maven在IDEA下载依赖包速度慢的问题解决
- IDEA Maven下载依赖包速度过慢的问题及解决方案
- IDEA Maven依赖下载总是失败的几种解决方法
- maven 删除下载失败的包的方法
用户点评