最近在准备项目架构时,虽然自己已经又了私服,通过私服进行仓库的管理,但是由于网速的限制原因,又想在项目环境迁移时可以快速的构建并启动或者快速更新,之前项目开发的工作中,使用了一个国外的一个仓库,拉取了一些坏的包,导致了一些异常,后来搞了好几天才解决掉(解决办法:当然是更换仓库镜像地址咯!!!),所以花费了些时间收集并整理了这些 maven镜像地址。
Maven 镜像地址大全
1、阿里的镜像地址
alimaven aliyun maven http://maven.aliyun.com/nexus/content/groups/public/ central
2、华为的镜像地址
huaweicloud mirror from maven huaweicloud https://mirror.huaweicloud.com/repository/maven/ central
使用华为Maven中央仓库时,需要在servers节点增加一个server子节点,内容如下:
huaweicloud anonymous devcloud
经过实际的生产使用后,貌似阿里的要比华为的要快些!
3、ibiblio 镜像地址(这个也比较快的呃)
ibiblio Mirror from Maven ibiblio http://mirrors.ibiblio.org/pub/mirrors/maven2/ central
4、repo1.maven.org 镜像地址
central Maven Repository Switchboard http://repo1.maven.org/maven2/ central
5、repo1.maven.apache.org 镜像地址
central Maven Repository Switchboard http://repo1.maven.apache.org/maven2/ central
6、repo2 镜像地址
repo2 Mirror from Maven Repo2 http://repo2.maven.org/maven2/ central
7、spring.io 镜像地址
sprintio central Human Readable Name for this Mirror. https://repo.spring.io/libs-snapshot/
8、UK 镜像地址
ui Mirror from UK http://uk.maven.org/maven2/ central
9、JBoos 镜像地址
jboss-public-repository-group JBoss Public Repository Group http://repository.jboss.org/nexus/content/groups/public central
8、Google 镜像地址
google maven https://maven.google.com/ central
9、Maven china镜像地址
maven.net.cn Mirror from Maven in china http://maven.net.cn/content/groups/public/ central
10、Maven oschina镜像地址
CN OSChinaCentral http://maven.oschina.net/content/groups/public/ central
在收集的这些Maven镜像地址中,有两个需要x墙的,如果说x墙比较麻烦,用闸门自己的都够用了,目前自己使用的 Maven 镜像地址有 阿里 和 ibiblio 两个镜像地址,关于为啥不用华为的,因为才出来不久,还在持续的维护和稳定进行中,后期如果发现其它比较好用的 Maven 镜像地址,会及时更新上来的!
Maven 镜像地址配置示例
搜集了那么多的 Maven 镜像地址,下面说说如何配置 Maven 镜像地址,进入 Maven 的配置文件 conf 文件中,找到 settings.xml 文件,如下图:
编辑该配置文件,找到
alimaven aliyun maven http://maven.aliyun.com/nexus/content/groups/public/ central
如下图:
到此这篇关于Maven镜像地址配置示例大全的文章就介绍到这了,更多相关Maven镜像地址配置内容请搜索考高分网以前的文章或继续浏览下面的相关文章希望大家以后多多支持考高分网!



