title: Maven Authentication failed
body: <p>I installed Maven 3.6.3 on my company computer and it runs with jdk 13.0.3. I add a certificate to the java KeyStore and configured the proxy at my settings.xml. But I still can´t get dependencies from <a href="https://repo.maven.apache.org/maven2/" rel="nofollow noreferrer">https://repo.maven.apache.org/maven2/</a> repository. I can access the site with my browser.</p>
  
  <p>Does somebody has any idea?</p>
  
  <p><strong>mvn -v:</strong></p>
  
  <pre><code>c:\progs\apache-maven-3.6.3\bin&gt;mvn -v
  Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
  Maven home: c:\progs\apache-maven-3.6.3\bin\..
  Java version: 13.0.2, vendor: Oracle Corporation, runtime: c:\progs\java\jdk-13.0.2
  Default locale: de_DE, platform encoding: Cp1252
  OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
  </code></pre>
  
  <p><strong>settings.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"&gt;
  
    &lt;localRepository&gt;c:\progs\maven-repository&lt;/localRepository&gt;
  
    &lt;proxies&gt;
      &lt;proxy&gt;
        &lt;id&gt;optional&lt;/id&gt;
        &lt;active&gt;true&lt;/active&gt;
        &lt;protocol&gt;http&lt;/protocol&gt;
        &lt;username&gt;*****&lt;/username&gt;
        &lt;password&gt;*****&lt;/password&gt;
        &lt;host&gt;*****&lt;/host&gt;
        &lt;port&gt;3128&lt;/port&gt;
        &lt;nonProxyHosts&gt;local.net|some.host.com&lt;/nonProxyHosts&gt;
      &lt;/proxy&gt;
    &lt;/proxies&gt;
  &lt;/settings&gt;
  </code></pre>
  
  <p><strong>pom.xml:</strong></p>
  
  <pre><code>&lt;project&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.mycompany.app&lt;/groupId&gt;
      &lt;artifactId&gt;my-app&lt;/artifactId&gt;
      &lt;version&gt;1&lt;/version&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p><strong>mvn output:</strong></p>
  
  <pre><code>c:\progs&gt;apache-maven-3.6.3\bin\mvn clean
  [INFO] Scanning for projects...
  [INFO]
  [INFO] ----------------------&lt; com.mycompany.app:my-app &gt;----------------------
  [INFO] Building my-app 1
  [INFO] --------------------------------[ jar ]---------------------------------
  Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time:  1.800 s
  [INFO] Finished at: 2020-04-15T09:51:25+02:00
  [INFO] ------------------------------------------------------------------------
  [ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): Authentication failed for https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom 401 authenticationrequired -&gt; [Help 1]
  [ERROR]
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR]
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
  </code></pre>
  
  <p>I think the proxy settings are correct, when I change them (false password) I get another failure:</p>
  
  <pre><code>[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): HTTP proxy server authentication failed for https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom 407 authenticationrequired -&gt; [Help 1]
  </code></pre>