Skip to end of metadata
Go to start of metadata

Configuring Maven behind an NTLM proxy

Maven, by itself, cannot work behind an NTLM proxy (e.g. ISA servers), because this kind of HTTP connection is not supported... at least directly.

But you're not lost, since you can use a "proxy-to-the-proxy". You have two choices, CNTLM and  NTLM APS.

Using CNTLM 

CNTLM is easy to install and configure. Once installed as reported in the website, configure Maven to work with CNTLM, adding this code in your settings.xml.

Et voilà! Maven works!

Using NTLM APS

NTLM has a bug with chunked responses, so you have to patch it, so I suggest to use CNTLM.

Anyway, if you want to make NTLM APS work:

  1. download the 0.9.9.6 version of NTLM APS;
  2. patch using this patch;
  3. run the NTLM APS server;
  4. configure Maven to work with NTLM APS, adding this code in your settings.xml.
  • No labels

3 Comments

  1. I found that also cntlm can be used, but I have to test it before changing the wiki:

    http://cntlm.sourceforge.net/

  2. I have tested this with Maven 3.0.4 running on JDK 1.6 on Windows 7 x64, and it doesn't work for me. The logging and tracing feature that cntlm has shows that Maven simply does not attempt to communicate via cntlm. cntlm itself works fine. Any ideas?

  3. Steve Brown I think you should edit the settings.xml file inside conf to use the cntlm service.

    This is example of the <proxy> section:

    <proxy>
    <active>true</active>
    <protocol>http</protocol>
    <username></username>
    <password></password>
    <host>localhost</host>
    <port>3128</port>
    </proxy>


    Note that the default port of cntlm is 3128 (change it accordingly).