title: Error "Could not transfer metadata" running Maven deploy with Jenkins
body: <p>I have 2 Maven projects, which are deployed daily in a Nexus snapshots repository by Jenkins builds.
  For one project, everything works fine. 
  For the second one, I have the error below every time Jenkins runs <code>mvn deploy</code> :</p>
  
  <pre><code>[INFO] --- maven-deploy-plugin:2.8.2:deploy (default-deploy) @ my-second-project ---
  [INFO] Downloading: http://my.nexus/content/repositories/snapshots/fr/domain/my-second-project/0.18.0-SNAPSHOT/maven-metadata.xml
  [WARNING] Could not transfer metadata fr.domain:my-second-project:0.18.0-SNAPSHOT/maven-metadata.xml from/to my.nexus (http://my.nexus/content/repositories/snapshots): Access denied to: http://my.nexus/content/repositories/snapshots/fr/domain/my-second-project/0.18.0-SNAPSHOT/maven-metadata.xml , ReasonPhrase:Forbidden.
  </code></pre>
  
  <p>The 2 projects have exactly the same version.</p>
  
  <p>I tried to run <code>mvn help:effective-settings</code> on both Jenkins builds, instead of <code>mvn deploy</code> : it returns exactly the same settings for both projects. But one deploys on Nexus and the other does not...</p>
  
  <p><strong><em>Edit</strong>: <code>mvn help:effective-pom</code> doesn't show any helpful difference either. Except for the project name and some dependencies, they are the same.</em></p>
  
  <p>In the case of the second project, it has never been deployed on Nexus. So metadata doesn't exists yet. But I tried to tail the nexus <code>request.log</code> file, and it's never hit when Jenkins runs <code>mvn deploy</code>on the second project. I have no trace of that call.</p>
  
  <p>Does anyone have an idea ?</p>
  
  <hr>
  
  <p><strong>Edit</strong>: 
  I've finally found out that the company proxy is throwing the "Forbidden" error. Which is weird, because in the <code>settings.xml</code> Maven configuration file, I have the following :</p>
  
  <pre><code>&lt;proxy&gt;
      &lt;id&gt;****&lt;/id&gt;
      &lt;active&gt;true&lt;/true&gt;
      &lt;protocol&gt;http&lt;/protocol&gt;
      &lt;host&gt;**********&lt;/host&gt;
      &lt;port&gt;8080&lt;/port&gt;
      &lt;nonProxyHosts&gt;my.nexus|127.0.0.1|...&lt;/nonProxyHosts&gt;
  &lt;/proxy&gt;
  </code></pre>
  
  <p>The job that fails is ignoring the "nonProxyHosts" part : the proxy defined in the config is called and throws the error. The job that builds normally doesn't call the proxy (expected behaviour).</p>
  
  <p>I'm still looking for ideas about the reason for this behaviour...</p>