title: Order of maven repositories in settings.xml
body: <p>I have a <code>settings.xml</code> which looks like below:-</p>
  
  <pre><code>&lt;settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"&gt;
     &lt;servers&gt;
        &lt;server&gt;
           &lt;id&gt;nReleases&lt;/id&gt;
           &lt;username&gt;test&lt;/username&gt;
           &lt;password&gt;test123&lt;/password&gt;
        &lt;/server&gt;
        &lt;server&gt;
           &lt;id&gt;nSnapshots&lt;/id&gt;
           &lt;username&gt;test&lt;/username&gt;
           &lt;password&gt;test123&lt;/password&gt;
        &lt;/server&gt;
     &lt;/servers&gt;
  
  &lt;profiles&gt;
      &lt;profile&gt;
          &lt;id&gt;space&lt;/id&gt;
          &lt;repositories&gt;
             &lt;repository&gt;
                  &lt;id&gt;central&lt;/id&gt;
                  &lt;url&gt;http://repo1.maven.org/maven2&lt;/url&gt;
              &lt;/repository&gt;
              &lt;repository&gt;
                  &lt;id&gt;nReleases&lt;/id&gt;
                  &lt;name&gt;Releases&lt;/name&gt;
                  &lt;url&gt;http://someserver/repository/maven-releases/&lt;/url&gt;
              &lt;/repository&gt;
             &lt;repository&gt;
                  &lt;id&gt;nSnapshots&lt;/id&gt;
                  &lt;name&gt;Snapshots&lt;/name&gt;
                  &lt;url&gt;http://someserver/repository/maven-snapshots/&lt;/url&gt;
              &lt;/repository&gt;
          &lt;/repositories&gt;
      &lt;/profile&gt;
  &lt;/profiles&gt;
  
  &lt;activeProfiles&gt;
      &lt;activeProfile&gt;space&lt;/activeProfile&gt;
  &lt;/activeProfiles&gt;
  &lt;/settings&gt;
  </code></pre>
  
  <p>I want maven to check <code>repo1.maven.org</code> first and then only look in <code>someserver</code>. Can someone let me know how this can be achieved? </p>
  
  <p>I am using Maven 3.3.9. </p>
  
  <p>I have gone through this <a href="https://stackoverflow.com/questions/5325407/how-to-set-order-of-repositories-in-maven-settings-xml">question</a> and tried to change the order in which repos are declared in profile but it did not help.</p>
  
  <pre><code>&lt;profile&gt;
      &lt;id&gt;space&lt;/id&gt;
      &lt;repositories&gt;   
          &lt;repository&gt;
              &lt;id&gt;nReleases&lt;/id&gt;
              &lt;name&gt;Releases&lt;/name&gt;
              &lt;url&gt;http://someserver/repository/maven-releases/&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;nSnapshots&lt;/id&gt;
              &lt;name&gt;Snapshots&lt;/name&gt;
              &lt;url&gt;http://someserver/repository/maven-snapshots/&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&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;/profile&gt;
  </code></pre>
  
  <p>Logs while doing <code>mvn clean install</code></p>
  
  <pre><code>tuk-MacBook-Pro-4:camel tuk$ mvn clean install
  [INFO] Scanning for projects...
  [INFO]                                                                         
  [INFO] ------------------------------------------------------------------------
  [INFO] Building camel 0.0.1-SNAPSHOT
  [INFO] ------------------------------------------------------------------------
  Downloading: http://someserver/repository/maven-releases/org/apache/camel/camel-redis/2.16.3/camel-redis-2.16.3.pom
  Downloading: http://someserver/repository/maven-snapshots/org/apache/camel/camel-redis/2.16.3/camel-redis-2.16.3.pom
  </code></pre>