Using mirrors of maven2 repositories

I’ve added to the docs the list of available maven2 mirrors, just use one of the following mirror entries in your settings.xml

<settings>

  <mirrors>
    <mirror>
      <id>dotsrc.org</id>
      <url>http://mirrors.dotsrc.org/maven2</url>
      <mirrorOf>central</mirrorOf>
    </mirror>
    <mirror>
      <id>ggi-project.org</id>
      <url>http://ftp.ggi-project.org/pub/packages/maven2</url>
      <mirrorOf>central</mirrorOf>
    </mirror>
    <mirror>
      <id>sunsite.dk</id>
      <url>http://mirrors.sunsite.dk/maven2</url>
      <mirrorOf>central</mirrorOf>
    </mirror>
    <mirror>
      <id>planetmirror.com</id>
      <url>http://public.planetmirror.com/pub/maven2</url>
      <mirrorOf>central</mirrorOf>
    </mirror>
    <mirror>
      <id>lsu.edu</id>
      <url>http://ibiblio.lsu.edu/main/pub/packages/maven2</url>
      <mirrorOf>central</mirrorOf>
    </mirror>
    <mirror>
      <id>ibiblio.net</id>
      <url>http://www.ibiblio.net/pub/packages/maven2</url>
      <mirrorOf>central</mirrorOf>
    </mirror>
  </mirrors>

</settings>

More information in the guide to mirror settings.

5 thoughts on “Using mirrors of maven2 repositories

  1. Carlos,

    With all the trouble iBiblio is having (it seems to be more unreliable than usual these days) I’ve attempted to add mirrors to my ~/.m2/settings.xml file. However, it doesn’t seem that Maven is using the settings! Is there a switch I need to provide to mvn to tell it to use my mirrors?

    I can tell that my settings.xml file is being read, because I have elements which are used to deploy to a local repository. Here’s the output of mvn compile as an example:
    ownloading: http://maven.mse.jhu.edu/m2repository/org/hibernate/hibernate3/3.1.2/hibernate3-3.1.2.pom
    [WARNING] Unable to get resource from repository bajor-m2 (http://maven.mse.jhu.edu/m2repository)
    Downloading: http://www.ibiblio.net/pub/packages/maven2/org/hibernate/hibernate3/3.1.2/hibernate3-3.1.2.pom
    [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
    Downloading: http://maven.mse.jhu.edu/m2repository/org/springframework/spring-context/2.0-m2/spring-context-2.0-m2.pom
    [WARNING] Unable to get resource from repository bajor-m2 (http://maven.mse.jhu.edu/m2repository)
    Downloading: http://www.ibiblio.net/pub/packages/maven2/org/springframework/spring-context/2.0-m2/spring-context-2.0-m2.pom
    [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
    Downloading: http://maven.mse.jhu.edu/m2repository/org/hibernate/hibernate3/3.1.2/hibernate3-3.1.2.jar
    [WARNING] Unable to get resource from repository bajor-m2 (http://maven.mse.jhu.edu/m2repository)
    Downloading: http://www.ibiblio.net/pub/packages/maven2/org/hibernate/hibernate3/3.1.2/hibernate3-3.1.2.jar
    [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s