Problem
I need to do some java POC project for my company, but large company alway comes with a lot of security restriction. One the restriction is that the internet is blocked behine a proxy server. In my previous experience, we could add some JVM arguments to setup the proxy setting.
At the time, I wrote this article, the official version of maven is 3.9. After some test, I found that the some previouse working solution no long work again.
Below are the solution, the I came up after few hours research.
Solution
Lets said are behind the proxy server with host equals 127.0.0.1 and port equals 8080.
Solution 1
This solution no longer working any, due to the maven repository has fade out the http repo. The maven artifact will fail to be fetch due to ssl verification fail (Companies alway switch the ssl certificate for any http request).
|
|
Solution 2
Stackoverflow Imporved based on solution 1
|
|
Solution 3 (for mavne 3.9 or later)
|
|