I'm behind a auto-generated proxy.
I've configured my settings.xml to use this proxy, but it still doesn't work. The Android SDK works fine with the same proxy which I've set.
<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">
<proxies>
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username></username>
<password></password>
<host>MY-PROXY-HOST-HERE</host>
<port>8080</port>
<nonProxyHosts></nonProxyHosts>
</proxy>
</proxies>
</settings>
What else can I do to make maven to work?
Error:
WARNING: NTLM authentication error: Credentials cannot be used for NTLM authenti
cation: org.apache.maven.wagon.providers.http.httpclient.auth.UsernamePasswordCr
edentials
How to get my NTLM authentication credintals?
Original error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): Not authorized by proxy , ReasonPhrase:Proxy Authorization Required.
This is the output message. In my wpad.dat (from where I've taken proxy data), I don't have a specified username and password...
credentials are not the solution!
Solution to your problem is cntlm
steps to go
First step -->
Steps to get rid of these NTLM proxy Issues permanently.
http_proxy
with value "http://localhost:3128
" and https_proxy
with value "http://localhost:3128
".Thats it!! now you never see error related to NTLM proxy authentication failed or anything else not even in sbt or maven!!! CNTLM is quite fast as it is developed in C !!
Second step -->
start cntlm authentication proxy server
make sure your settings.xml file's proxy look like this.
<proxies>
<!-- proxy
| Specification for one proxy, to be used in connecting to the network.
|-->
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>127.0.0.1</host>
<port>3128</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
</proxies>
Plese give me feedback if something does not work!
I've found a working solution on codepen.io. You simply put a wagon-http-lightweight
jar into Maven lib/ext
folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With