Maven中配置一下权威的公共仓库,真的是有必要的。下面介绍几个:
1. Java.net仓库
<repositories> <repository> <id>java.net</id> <url>https://maven.java.net/content/repositories/public/</url> </repository> </repositories>
<repositories> <repository> <id>JBoss repository</id> <url>http://repository.jboss.org/nexus/content/groups/public/</url> </repository> </repositories>3. Spring仓库
<repositories> <repository> <id>spring io</id> <url>http://repo.spring.io/libs-milestone/</url> </repository> </repositories>
4.其它
还有这么多的库可供选择。
<repository> <id>MavenCentral</id> <name>Maven repository</name> <url>http://repo1.maven.org/maven2</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>objectweb</id> <name>Objectweb repository</name> <url>http://maven.objectweb.org/maven2</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>jboss</id> <name>JBoss Maven2 repository</name> <url>http://repository.jboss.com/maven2/</url> <snapshots> <enabled>false</enabled> </snapshots> <releases> <enabled>true</enabled> </releases> </repository> <repository> <id>glassfish</id> <name>Glassfish repository</name> <url>http://download.java.net/maven/1</url> <layout>legacy</layout> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>apache.snapshots</id> <name>Apache Snapshot Repository</name> <url> http://people.apache.org/repo/m2-snapshot-repository </url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> <repository> <id>ops4j.repository</id> <name>OPS4J Repository</name> <url>http://repository.ops4j.org/maven2</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>Codehaus Snapshots</id> <url>http://snapshots.repository.codehaus.org/</url> <snapshots> <enabled>true</enabled> </snapshots> <releases> <enabled>false</enabled> </releases> </repository>
原文:http://blog.csdn.net/john_f_lau/article/details/24369805