博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
使用maven镜像
阅读量:6889 次
发布时间:2019-06-27

本文共 2315 字,大约阅读时间需要 7 分钟。

综述

用maven做项目,最郁闷的莫过于某些依赖库下载不了。被墙了,你懂的。使用maven镜像仓库及其重要,特别是国内的镜像,可以有效缓解被墙疼痛。

常用的镜像

国外镜像

ibiblio.org

ibiblio
central
ibiblio Mirror of http://repo1.maven.org/maven2/
http://mirrors.ibiblio.org/pub/mirrors/maven2/

jboss

jboss-public-repository-group
central
JBoss Public Repository Group
http://repository.jboss.org/nexus/content/groups/public

repo2

repo2
central
Human Readable Name for this Mirror.
http://repo2.maven.org/maven2/

uk.maven.org

ui
central
Human Readable Name for this Mirror.
http://uk.maven.org/maven2/

国内镜像

oschina.net

nexus-osc
*
Nexus osc
http://maven.oschina.net/content/groups/public/

net.cn

net-cn
central
Human Readable Name for this Mirror.
http://maven.net.cn/content/groups/public/

使用镜像

下文以oschina.net的镜像为例子.

1.Maven 的安装目录下的 conf 文件下有个 settings.xml 文件,编辑该文件

2.在<mirrors>中插入:

nexus-osc
*
Nexus osc
http://maven.oschina.net/content/groups/public/

3.这里是配置 Maven 的 mirror 地址指向OSChina 的 Maven 镜像地址。 在执行 Maven 命令的时候, Maven 还需要安装一些插件包,这些插件包的下载地址也让其指向 oschina.net 的 Maven 地址。在<profiles>中插入:

jdk-1.4
1.4
nexus
local private nexus
http://maven.oschina.net/content/groups/public/
true
false
nexus
local private nexus
http://maven.oschina.net/content/groups/public/
true
false

参考:

转载地址:http://wetbl.baihongyu.com/

你可能感兴趣的文章
IDEA查看类的继承关系
查看>>
js选项卡功能3
查看>>
Redis 连接
查看>>
威胁快报|Nexus Repository Manager 3新漏洞已被用于挖矿木马传播,建议用户尽快修复...
查看>>
关于redis,学会这8点就够了
查看>>
阿里小二的日常工作要被TA们“接管”了!
查看>>
权限框架Shiro学习之表结构设计
查看>>
Nginx 服务器之速率限制
查看>>
JavaScript实现多态和继承的封装操作示例
查看>>
大数据平台开发公司有哪些?
查看>>
用vs运行cmake后的工程
查看>>
1.1 函数定义 1.2 函数的参数 1.3 函数的默认参数
查看>>
不学无数——Java动态代理
查看>>
如何使用手机、家庭宽带作为爬虫的代理服务器
查看>>
Python黑客攻击的几种技术,你得了解一下
查看>>
你真的懂了redis的数据结构吗?redis内部数据结构和外部数据结构揭秘
查看>>
Ubuntu10.04LTS配置Hadoop1.0.1+HBase 0.92.0
查看>>
ST教学分析:相同行为连续数
查看>>
status2 转义输出
查看>>
[清华集训2016]如何优雅地求和——NTT
查看>>