title: unauthorized access on artifactory even though credentials are included
body: <p>I am trying to deploy a zip file to a remote inhouse maven repo.(artifactory integrated into hudson).</p>
  
  <p><strong>pom.xml</strong></p>
  
  <pre><code>...
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
  &lt;groupId&gt;mygroupId&lt;/groupId&gt;
  &lt;artifactId&gt;myartifactid&lt;/artifactId&gt;   
  
  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  
  &lt;distributionManagement&gt;
      &lt;repository&gt;
        &lt;id&gt;hudson&lt;/id&gt;
        &lt;name&gt;hudson-releases&lt;/name&gt;
        &lt;url&gt;http://url to repo&lt;/url&gt;
      &lt;/repository&gt;
    &lt;/distributionManagement&gt;
  ...
  </code></pre>
  
  <p><strong>settings.xml</strong></p>
  
  <pre><code>&lt;servers&gt;
  &lt;server&gt;
    &lt;id&gt;hudson&lt;/id&gt;
    &lt;username&gt;username&lt;/username&gt;
    &lt;password&gt;password&lt;/password&gt;
  &lt;/server&gt;
  &lt;/servers&gt; 
  </code></pre>
  
  <p><strong>maven deploy</strong></p>
  
  <pre><code> mvn deploy:deploy-file -Durl=http://url -Dfile=file-1.0.0.zip  -Dpackaging=zip  -DpomFile=pom.xml
  </code></pre>
  
  <p>maven quits with return code 401.</p>
  
  <p>Looking at <strong>artifactory's logs</strong> </p>
  
  <pre><code> 2011-07-15 13:52:50,090 [DENIED DEPLOY] libs-release-local:somefile.zip for anonymous/192.168.220.146.
  </code></pre>
  
  <p>I don't understand why maven doesn't use the supplied credentials.
  What am i doing wrong here ? </p>