What are the main/best Maven repositories to use that will include the majority of your open source Java package dependencies.
Also in what order should these be included? Does it matter?
What are the main/best Maven repositories to use that will include the majority of your open source Java package dependencies.
Also in what order should these be included? Does it matter?
This is the current setup in the project we are building:
and some snapshots (see below)
<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>
I would suggest using a Maven proxy like Archiva, Artifactory or Nexus and defining your repo list on the server side. The order matters only to the extent that the proxy server tries the proxied repos one by one and specifying a fringe repository as first will slow down the resolution of uncached artifacts (Artifactory allows you to specify whitelist and blacklist expressions for each proxied repo, which solves this problem)
Overall using your own repo gives you more control and reliable builds ('central' is often painfully slow). It also gives you a place to put your own artifacts and any non-free 3rd party artifacts.
I recommend Nexus See http://stackoverflow.com/questions/165846/best-enterprise-repository-tool-for-maven-2#166440