You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Cédric Blomart (FOD Economie - SPF Economie)" <Ce...@economie.fgov.be> on 2019/10/10 10:08:42 UTC
Standard http proxy environment variable evaluation
Hello,
By looking at this over the internet I don't find much informations.
Apparently the sole reliable way to configure proxy usage is trough ".m2/settings.xml" which annoys me when using CI/CD and docker behind proxies.
We do set standard environment variables for proxies in the builds that needs it. But maven doesn't use these variables.
I would like to lookup if it would be possible to evaluate http_proxy or https_proxy environment variables to fill in proxy settings.
I didn't find any opened Jira about that altought there are a lot ramblings about using java properties ("-Dhttp.proxyHost" ...).
Any remarks, toughts about this?
Cédric
Re: Standard http proxy environment variable evaluation
Posted by Michael Osipov <mi...@apache.org>.
Am 2019-10-10 um 12:08 schrieb Cédric Blomart (FOD Economie - SPF Economie):
> Hello,
>
> By looking at this over the internet I don't find much informations.
> Apparently the sole reliable way to configure proxy usage is trough ".m2/settings.xml" which annoys me when using CI/CD and docker behind proxies.
>
> We do set standard environment variables for proxies in the builds that needs it. But maven doesn't use these variables.
>
> I would like to lookup if it would be possible to evaluate http_proxy or https_proxy environment variables to fill in proxy settings.
>
>
> I didn't find any opened Jira about that altought there are a lot ramblings about using java properties ("-Dhttp.proxyHost" ...).
>
> Any remarks, toughts about this?
The reason why this is not done is because Java is not C, thus not using
environment variables.
There are several ways to solve this:
* Introduce a custom route planner which will read the vars. HttpClient
does not have a proxy selector abstraction
* Set the JVMs default proxy selector to your custom implemenation and
HttpClient will pick it up automatically.
All of this is Maven Wagon related
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org