maven - proxy - Could not transfer artifact. (Corporate proxy)

1

Maven does not download the link

libraries

I'm trying to download the maven repository to create a Java application. If I do it from home it works because I do not have a proxy, if I do it from the company it does not download even if I configure the proxy in settings.xml.

  • I identified the proxy to connect to the Internet: IE - > Internet options - > Connections - > LAN settings

    *** In my case the Connections tab was disabled and enabled from the registry: regedit - > Computer \ HKEY_LOCAL_MACHINE \ SOFTWARE \ Polices \ Microsoft \ Internet Explorer \ Control Panel \ - > ConnectionsTab = 0

  • Modified the file $ {user.home} / .m2 / settings.xml to include the proxy and port:

    <proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol>
      <username>[user]</username>
      <password>[password]</password>
      <host>[proxy]</host>
      <port>8080</port>
      <nonProxyHosts>localhost</nonProxyHosts>
    </proxy>
    
  • When executing any maven command it shows me the error:

  •   

    [WARNING] NEGOTIATE authentication error: No valid credentials provided (Mechanism level: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt))

         

    [WARNING] NTLM authentication error: Credentials can not be used for NTLM authentication: org.apache.maven.wagon.providers.http.httpclient.auth.UsernamePasswordCredentials

    4.I tried to pass the proxy data by parameter but it still does not work:

    set MAVEN_OPTS="-DsocksProxyHost=[proxy] -DsocksProxyPort=8080"
    
  • Apparently it is an authentication issue, I tried with different combinations in the username (user, domain / user, domain \ user, user @ server_mail) but it does not work.
  • Maven I execute from command line and from eclipse. I already consulted several post of stack and several suggest to put the proxy well and change the file eclipse.ini with this:

      

    -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors = org.eclipse.ecf.provider.filetransfer.httpclient4

    However, it still does not work. Any suggestions are welcome.

        
    asked by Richard 27.04.2018 в 01:39
    source

    1 answer

    0

    I kept looking and found this post:

    link

    At the end comes the comment of xuesheng, I took the solution that indicates and worked:

    The jar wagon-http-lightweight should be copied into the folder lib/ext ( link )

        
    answered by 30.04.2018 в 17:05