title: Maven: meaning of repository ID
body: <p>In my POM file, I'm specifying two repositories:</p>
  
  <pre><code>&lt;repositories&gt;
      &lt;repository&gt;
          &lt;id&gt;myid&lt;/id&gt;
          &lt;url&gt;http://url1&lt;/url&gt;
      &lt;/repository&gt;
      &lt;repository&gt;
          &lt;id&gt;myid&lt;/id&gt;
          &lt;url&gt;http://url2&lt;/url&gt;
      &lt;/repository&gt;
  &lt;/repositories&gt;
  </code></pre>
  
  <p>So, from the Maven documentation, I got the impression that the <code>id</code> element should cross-reference with a <code>settings.xml</code> <code>server</code> entry, to specify authentication information. Both <code>http://url1</code> and <code>http://url2</code>, in my case, require the very same authentication data; that is why I'm using the same <code>id</code> for both.</p>
  
  <p>Still, Maven complains, saying that the <code>id</code> element must be unique.</p>
  
  <p>What gives? What exactly is that purpose of the <code>id</code> element? I know (for sure) that Maven uses it to get authentication data - which is why things work when I only specify one repository. Why do I have to duplicate my authentication data? what am I missing?</p>