您的位置:首页 > 其它

Ubuntu 14.04 下解决maven访问速度慢问题

2017-06-11 17:46 295 查看

参考:

maven国内镜像(maven下载慢的解决方法)

maven中央仓库访问速度太慢的解决办法

Ubuntu 14.04 下解决maven访问速度慢问题

在启动OVX的时候,由于sh脚本中需要使用maven来packaging OVX,导致半天出不来结果。

解决方法:

1.进入
/usr/share/maven/conf
目录;

2.修改
settings.xml
文件,在
<mirrors>
后加上:

<?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>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
</mirror>

<!-- 中央仓库1 -->
<mirror>
<id>repo1</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo1.maven.org/maven2/</url>
</mirror>

<!-- 中央仓库2 -->
<mirror>
<id>repo2</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo2.maven.org/maven2/</url>
</mirror>
</mirrors>
</settings>


2017.6.11

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: