title: Using multiple corporate repositories
body: <p>Yesterday I asked about using an exlusive maven repository, now it turns I need to use 2, they are both private .. so concerning <a href="http://maven.apache.org/guides/mini/guide-mirror-settings.html" rel="nofollow noreferrer">this link</a> which explains about forcing maven to use one repository, how do I specify the second repository? Lets take for instance I have two of these repositories in my pom.xml now, if something is missing in the two repositories it will go and search the dependency on the public repository, how to prevent this? </p>
  
  <pre><code>&lt;repositories&gt;
      &lt;repository&gt;
        &lt;id&gt;my-internal-site&lt;/id&gt;
        &lt;name&gt;our maven repository&lt;/name&gt;
        &lt;url&gt;http://myserver/repo&lt;/url&gt;
      &lt;/repository&gt;
   &lt;repository&gt;
        &lt;id&gt;my-other-internal-site&lt;/id&gt;
        &lt;name&gt;our 2nd maven repository&lt;/name&gt;
        &lt;url&gt;http://myserver/repo2&lt;/url&gt;
      &lt;/repository&gt;
    &lt;/repositories&gt;
  </code></pre>
  
  <p>Would I need to alter the setting xml as this?</p>
  
  <pre><code>&lt;settings&gt;
    ...
    &lt;mirrors&gt;
      &lt;mirror&gt;
        &lt;id&gt;internal-repository&lt;/id&gt;
        &lt;name&gt;our maven repository&lt;/name&gt;
        &lt;url&gt;http://myserver/repo&lt;/url&gt;
        &lt;mirrorOf&gt;my-internal-site,my-other-internal-site&lt;/mirrorOf&gt;
      &lt;/mirror&gt;
      &lt;mirror&gt;
        &lt;id&gt;my-other-internal-site&lt;/id&gt;
        &lt;name&gt;our 2nd maven repository&lt;/name&gt;
        &lt;url&gt;http://myserver/repo2&lt;/url&gt;
        &lt;mirrorOf&gt;my-internal-site,my-other-internal-site&lt;/mirrorOf&gt;
      &lt;/mirror&gt;
    &lt;/mirrors&gt;
    ...
  &lt;/settings&gt;
  </code></pre>
  
  <p>Or in some other way ?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I know that I don't need to set repositories in my pom.xml if I specify exclusive ones in settings.xml .. I'm just making a point so someone can answer my question better.. thank you</p>