Maven 设置 mirror

 

  在maven的配置文件 maven/conf/setting.xml 的 <mirrors> 标签对里添加要设置的 mirror

<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> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> <mirror> <id>ui</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://uk.maven.org/maven2/</url> </mirror> <mirror> <id>osc</id> <mirrorOf>central</mirrorOf> <url>http://maven.oschina.net/content/groups/public/</url> </mirror> <mirror> <id>osc_thirdparty</id> <mirrorOf>thirdparty</mirrorOf> <url>http://maven.oschina.net/content/repositories/thirdparty/</url> </mirror> </mirrors> </settings>

 

上一篇:链接选项 rpath 的原理和应用


下一篇:Linux下查看并发连接数