0

When I run any maven command with specified http and https proxy address and port as below:

mvn <command> -Dhttps.proxyHost=<MY.PROXY.HOST.ADDRESS> -Dhttps.proxyPort=<MY_PROXY_PORT> -Dhttp.proxyHost...

It's running without any error.

I want to set those configurations as default for my STS network connections and select the manual Active Provider (see attached screenshot for my configurations),

STS Network connections configurations --screenshot

I think it's not related to the STS versions because I faced the same problem with 3.8 and 4.6 version. Anyway, Here is my STS version

STS version --screenshot

Now, when I try the same maven command without proxy and port arguments, the maven command fails due to a network connection error.

[ERROR] unable to read java.net.ConnectException: Connection timed out

Martin Lippert
  • 5,988
  • 1
  • 15
  • 18
  • I think the solution to this is to configure a Maven settings.xml file to use the proxies for Maven and then configure Eclipse/SpringTools to use that settings.xml file in the preference section for `Maven -> User Settings`. Searching for something like Maven, Proxy, Eclipse should point you to various pages explaining the details. – Martin Lippert Sep 23 '20 at 07:08
  • Thanks @MartinLippert My maven **setting.xml** file already define http and https proxies, but the same problem persist. – Naiim Khaskhoussi Sep 23 '20 at 13:45
  • And you configured that settings.xml file in your Maven preferences in Eclipse already? (just to make sure that it is picked up by the Maven build running inside of the IDE) – Martin Lippert Sep 29 '20 at 06:38
  • If that doesn't help, I would file a bug for the m2e project to see what is going wrong there maybe. – Martin Lippert Sep 29 '20 at 06:39

0 Answers0