title: Maven failing to download artifact from proxy repository?
body: <p>A Maven build for a project is failing on one system but not others.</p>
  
  <p>The other systems are correctly determining that the parent pom is located here:<br>
  <a href="http://(address)/nexus/service/local/repositories/releases/content/(path/to/parent.pom)" rel="nofollow">http://(address)/nexus/service/local/repositories/releases/content/(path/to/parent.pom)</a></p>
  
  <p>The failing build looks at each of the proxy repository addresses and fails to find it at the correct proxy address or any of the other proxy servers (see error output below).</p>
  
  <p>Both systems are using the same JDK and Maven version, with identical settings.xml files identifying the appropriate proxy repositories.  They have the same physical connection to the network, and similar firewall etc. settings. No 3rd-party Antivirus software.  The key difference is that the failing system is running Windows Server 2012 rather than Windows 7 or 8.</p>
  
  <h3>What could be causing this single build to fail?</h3>
  
  <p>How can I determine why the POM can't be downloaded from the correct URL? (Note that the URL is accessible from the internet browser; the POM can be manually downloaded easily.)</p>
  
  <p>Excerpt from expanded maven output:</p>
  
  <pre><code>INFO] Scanning for projects...
  [DEBUG] Using transporter WagonTransporter with priority -1.0 for http://(address)/nexus/content/groups/public
  [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for http://(address)/nexus/content/groups/public via proxy.company.org:80 with username=, password=***
  Downloading: http://(address)/nexus/content/groups/public/org/company/subgroup/subgroup-project/0.2.10/subgroup-project-0.2.10.pom
  
  [DEBUG] Writing tracking file C:\m2repo\org\company\subgroup\subgroup-project\0.2.10\subgroup-project-0.2.10.pom.lastUpdated
  [DEBUG] Using transporter WagonTransporter with priority -1.0 for http://(address)/nexus/content/groups/external
  [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for http://(address)/nexus/content/groups/external via proxy.company.org:80 with username=, password=***
  Downloading: http://(address)/nexus/content/groups/external/org/company/subgroup/subgroup-project/0.2.10/subgroup-project-0.2.10.pom
  
  [DEBUG] Writing tracking file C:\m2repo\org\company\subgroup\subgroup-project\0.2.10\subgroup-project-0.2.10.pom.lastUpdated
  [DEBUG] Using transporter WagonTransporter with priority -1.0 for http://(address)/nexus/content/groups/company-subgroup
  [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for http://(address)/nexus/content/groups/company-subgroup via proxy.company.org:80 with username=, password=***
  Downloading: http://(address)/nexus/content/groups/company-subgroup/org/company/subgroup/subgroup-project/0.2.10/subgroup-project-0.2.10.pom
  
  [DEBUG] Writing tracking file C:\m2repo\org\company\subgroup\subgroup-project\0.2.10\subgroup-project-0.2.10.pom.lastUpdated
  [DEBUG] Using transporter WagonTransporter with priority -1.0 for http://(address)/nexus/content/groups/mirror
  [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for http://(address)/nexus/content/groups/mirror via proxy.company.org:80 with username=, password=***
  Downloading: http://(address)/nexus/content/groups/mirror/org/company/subgroup/subgroup-project/0.2.10/subgroup-project-0.2.10.pom
  
  [DEBUG] Writing tracking file C:\m2repo\org\company\subgroup\subgroup-project\0.2.10\subgroup-project-0.2.10.pom.lastUpdated
  [DEBUG] Using transporter WagonTransporter with priority -1.0 for http://(address)/nexus/content/groups/proxied-repositories
  [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for http://(address)/nexus/content/groups/proxied-repositories via proxy.company.org:80 with username=, password=***
  Downloading: http://(address)/nexus/content/groups/proxied-repositories/org/company/subgroup/subgroup-project/0.2.10/subgroup-project-0.2.10.pom
  
  [DEBUG] Writing tracking file C:\m2repo\org\company\subgroup\subgroup-project\0.2.10\subgroup-project-0.2.10.pom.lastUpdated
  [DEBUG] Using transporter WagonTransporter with priority -1.0 for http://(address)/nexus/content/repositories/central
  [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for http://(address)/nexus/content/repositories/central via proxy.company.org:80 with username=, password=***
  Downloading: http://(address)/nexus/content/repositories/central/org/company/subgroup/subgroup-project/0.2.10/subgroup-project-0.2.10.pom
  
  [DEBUG] Writing tracking file C:\m2repo\org\company\subgroup\subgroup-project\0.2.10\subgroup-project-0.2.10.pom.lastUpdated
  [ERROR] [ERROR] Some problems were encountered while processing the POMs:
  [FATAL] Non-resolvable parent POM for org.company.subgroup.project_package:project:0.1: Could not transfer artifact org.company.subgroup:subgroup-project:pom:0.2.10 from/to public (http://(address)/nexus/content/groups/public): Access denied to: http://(address)/nexus/content/groups/public/org/company/subgroup/subgroup-project/0.2.10/subgroup-project-0.2.10.pom , ReasonPhrase:Forbidden. and 'parent.relativePath' points at wrong local POM @ line 15, column 13
   @ 
  [ERROR] The build could not read 1 project -&gt; [Help 1]
  org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
  [FATAL] Non-resolvable parent POM for org.company.subgroup.project_package:project:0.1: Could not transfer artifact org.company.subgroup:subgroup-project:pom:0.2.10 from/to public (http://(address)/nexus/content/groups/public): Access denied to: http://(address)/nexus/content/groups/public/org/company/subgroup/subgroup-project/0.2.10/subgroup-project-0.2.10.pom , ReasonPhrase:Forbidden. and 'parent.relativePath' points at wrong local POM @ line 15, column 13
  </code></pre>
  
  <h3>Edit:</h3>
  
  <p>Using Wireshark, it looks like Maven is receiving a 403 Forbidden response to its GET requests. Why would Maven receive this response if the same request outside maven works just fine?  </p>
  
  <p>The headers I used to verify the GET request:</p>
  
  <pre><code>user_agent = 'Apache-Maven/3.0.3 (Java 1.8.0_51; Windows Server 2012 R2 6.3)'
  headers = { 'Accept-Encoding' : 'gzip',
              'Pragma' : 'no-cache',
              'User-Agent' : user_agent,
              'Host' : proxy.company.org',
              'Accept' : 'text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2',
              'Proxy-Connection' : 'keep-alive',
            }
  </code></pre>