maven integration with eclipse 3.0.4 does not work with NTLM proxy

Recently downloaded m2e(maven integration with eclipse). The version is 3.0.4. My environment is behind a NTLM proxy. Looking like both Eclipse and mavne having issues to work with NTLM proxy. Found maven did not work with the proxy. Tried to set the proxy in settings.xml file like this:

  <proxies>
   <proxy>
      <active>true</active>
      <protocol>http</protocol>
      <host>proxy.somewhere.com</host>
      <port>8080</port>
      <username>proxyuser</username>
      <password>somepassword</password>
      <nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts>
    </proxy>
  </proxies>

It did not work.

Later tried to specify the http proxy information in the JVM parameter.

-Dhttp.proxyPort=8080(your port)

-Dhttp.proxyHost=192.168.19.200(your IP)

-Dhttp.nonProxyHosts=localhost|127.0.0.1(排除localhost,和127.0.0.1使用proxy)

It did not work also.

But I found the command line maven 2.2.1 worked well using the settings.xml.

Later I downloaded a command line maven 3.10, I found the command line maven 3.1.0 did not work also. Both the settings.xml and JVM parameter did not work. So I research more. Later I found out the root cause is that the maven 3.0.4 or above is having issues with the NTLM proxy(There are other types of proxy, here it is NTLM proxy.).  For the command line maven 3.1.0, we can download a extension jar file http://repo.maven.apache.org/maven2/org/apache/maven/wagon/wagon-http-lightweight/2.2/wagon-http-lightweight-2.2.jar

and save it to <command line maven home directory>/lib/ext.

and then commane line maven worked well with NTLM proxy.

For the m2e(the integrated maven with eclipse), I have not found any workable solution. Maybe we have to add an external maven installation in m2e. That way we can at least make a workable m2e.

Let me try out.

 

posted on   mikelij  阅读(985)  评论(1编辑  收藏  举报

编辑推荐:
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示