官方的源非常非常慢,没有办法使用,需要切换国内的源。从maven安装目录的conf下拷贝setting.xml到c:/用户/username/.m2下,并修改如下内容。
- <mirrors>
- <mirror>
- <id>alimaven</id>
- <mirrorOf>central</mirrorOf>
- <name>aliyun maven</name>
- <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
- </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>jboss-public-repository-group</id>
- <mirrorOf>central</mirrorOf>
- <name>JBoss Public Repository Group</name>
- <url>http://repository.jboss.org/nexus/content/groups/public</url>
- </mirror>
- </mirrors>