最近使用maven, 发现下载很慢, 发现可以修改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"> <!-- This is a settings.xml file retrieved from http://nexus.magnolia-cms.com/ --> <mirrors> <mirror> <id>maven.net.cn</id> <name>one of the central mirrors in china</name> <url>http://maven.oschina.net/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors>
在 settings下填加mirrors节点, jar包会直接从这个站点下载了 http://maven.oschina.net/content/groups/public/