Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven proxy settings password

I have been trying to set-up Maven for use in our dev department but come accross the same error I am convinced I have made an error within the settings.xml proxy section

I am trying to point to our internet server by I.P and provide my credentials to allow access to the proxy

<proxy>
  <id>our-proxy</id>
  <active>true</active>
  <protocol>http</protocol>
  <host>255.255.255.255</host>
  <port>80</port>
  <username>me</username>
  <password>password</password>
</proxy>

I tried to use the documentation for password encryption but the meaning got lost in translation, if anyone has any links that could help or just plain knows the answer I would be very greatful.

like image 822
Deviland Avatar asked Jan 18 '23 13:01

Deviland


2 Answers

If you are referring to Maven 3.0.4, you could continue to work behind NTLM proxy and not have to mention the username and password at all (assuming you are working out of dev box in which you have already logged in using the same credentials).

In Maven 3.0.3, this step was not required explicitly, but in 3.0.4 this is required explicitly. You need to download http://repo.maven.apache.org/maven2/org/apache/maven/wagon/wagon-http-lightweight/2.2/wagon-http-lightweight-2.2.jar and put it in [your directory structure]\apache-maven-3.0.4\lib\ext folder. After that you could simply use the proxy setting that you have mentioned before and omit the username and password altogether. It should work alright.

I have blogged about this at http://techforenterprise.blogspot.hk/2012/07/move-to-maven-304.html if you need more data.

like image 190
partha Avatar answered Jan 20 '23 04:01

partha


The error was due to Maven not supporting NTLM authentication a simple but yet effective way to get around this problem is to use CNTLM proxy server and point maven at it and it at the web all worked out well for me hope this answer helps someone else.

http://cntlm.sourceforge.net/

like image 40
Deviland Avatar answered Jan 20 '23 04:01

Deviland