title: How to set order of repositories in Maven settings.xml
body: <p>I have 3 repositories in my settings.xml because I need artifacts from all of them. Whenever a dependency is not found, Maven tries</p>
  
  <pre><code>Downloading: http://some.server/mvn2repo/releases/org/apache/lucene/lucene-core/2.9.1/...
  [INFO] Unable to find resource 'org.apache.lucene:lucene-core:pom:2.9.1' in repository
  Downloading: http://some.server/mvn2repo/3rdParty/org/apache/lucene/lucene-core/2.9.1/...
  [INFO] Unable to find resource 'org.apache.lucene:lucene-core:pom:2.9.1' in repository
  Downloading: http://repo1.maven.org/maven2/org/apache/lucene/lucene-core/2.9.1/lucene-core-2.9.1.pom
  &lt;success&gt;
  </code></pre>
  
  <p>all repositories, but most of the time finds the artifact in central (repo1) of course. I want Maven to check this repo first. I tried order of declarations in settings.xml, but did not work. According to <em>fgysin</em> I also tried the reverse order, which didn't change anything.</p>
  
  <p>My Maven version:</p>
  
  <pre><code>C:\&gt;mvn -v
  Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
  Java version: 1.6.0_15
  Java home: C:\Program Files\Java\jdk1.6.0_15\jre
  Default locale: de_AT, platform encoding: Cp1252
  OS name: "windows vista" version: "6.0" arch: "amd64" Family: "windows"
  </code></pre>
  
  <p>My <code>settings.xml</code></p>
  
  <pre><code>&lt;profiles&gt;
      &lt;profile&gt;
          &lt;id&gt;space&lt;/id&gt;
          &lt;repositories&gt;
              &lt;repository&gt;
                  &lt;releases&gt;
                      &lt;enabled&gt;true&lt;/enabled&gt;
                  &lt;/releases&gt;
                  &lt;snapshots&gt;
                      &lt;enabled&gt;false&lt;/enabled&gt;
                  &lt;/snapshots&gt;
                  &lt;id&gt;s1-releases&lt;/id&gt;
                  &lt;name&gt;System One Releases&lt;/name&gt;
                  &lt;url&gt;http://some.server/mvn2repo/releases&lt;/url&gt;
              &lt;/repository&gt;
              &lt;repository&gt;
                  &lt;releases&gt;
                      &lt;enabled&gt;true&lt;/enabled&gt;
                  &lt;/releases&gt;
                  &lt;snapshots&gt;
                      &lt;enabled&gt;false&lt;/enabled&gt;
                  &lt;/snapshots&gt;
                  &lt;id&gt;s1-3rdParty&lt;/id&gt;
                  &lt;name&gt;System One 3rd Party Releases&lt;/name&gt;
                  &lt;url&gt;http://some.server/mvn2repo/3rdParty&lt;/url&gt;
              &lt;/repository&gt;
              &lt;repository&gt;
                  &lt;releases&gt;
                      &lt;enabled&gt;true&lt;/enabled&gt;
                  &lt;/releases&gt;
                  &lt;snapshots&gt;
                      &lt;enabled&gt;true&lt;/enabled&gt;
                  &lt;/snapshots&gt;
                  &lt;id&gt;central&lt;/id&gt;
                  &lt;url&gt;http://repo1.maven.org/maven2&lt;/url&gt;
              &lt;/repository&gt;
          &lt;/repositories&gt;
          &lt;pluginRepositories&gt;
              &lt;pluginRepository&gt;
                  &lt;releases&gt;
                      &lt;enabled&gt;true&lt;/enabled&gt;
                  &lt;/releases&gt;
                  &lt;snapshots&gt;
                      &lt;enabled&gt;true&lt;/enabled&gt;
                  &lt;/snapshots&gt;
                  &lt;id&gt;central&lt;/id&gt;
                  &lt;url&gt;http://repo1.maven.org/maven2&lt;/url&gt;
              &lt;/pluginRepository&gt;
          &lt;/pluginRepositories&gt;
      &lt;/profile&gt;
  &lt;/profiles&gt;
  
  &lt;activeProfiles&gt;
      &lt;activeProfile&gt;space&lt;/activeProfile&gt;
  &lt;/activeProfiles&gt;
  </code></pre>