maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Connolly <stephen.alan.conno...@gmail.com>
Subject Re: Using Maven's configured proxy in a plugin?
Date Mon, 21 May 2018 20:53:13 GMT
plus the newer java proxy methods allow for different proxies per host...
and at the very least we need to take into account the non-proxy host
requirements

On 21 May 2018 at 20:49, Michael Osipov <michaelo@apache.org> wrote:

> Am 2018-05-21 um 21:30 schrieb Robert Scholte:
>
>> So we need a new method: #getActiveProxy(String protocol)  ?
>>
>
> At least that, better yet one proxy can handle multiple protocols. The
> proxy design of Java is 15 years old. Back then it was assumed that
> companies have different proxies for HTTP and HTTPS. Today, this isn't true
> anymore. We have at work ZScaler's proxy which does even SSH over HTTP.
>
>
> On Mon, 21 May 2018 20:02:22 +0200, Michael Osipov <michaelo@apache.org>
>> wrote:
>>
>> Am 2018-05-21 um 19:53 schrieb Mark Raynsford:
>>>
>>>> On 2018-05-21T19:46:26 +0200
>>>> "Robert Scholte" <rfscholte@apache.org> wrote:
>>>>
>>>> Of course :)
>>>>>
>>>>> This is probably a good example:
>>>>> https://github.com/apache/maven-javadoc-plugin/blob/master/
>>>>> src/main/java/org/apache/maven/plugins/javadoc/Abstract
>>>>> JavadocMojo.java#L3582
>>>>>
>>>>  Hah, thanks! That's a pretty direct example!
>>>>  For future visitors:
>>>>  1. Inject a Settings instance using the normal injection mechanisms:
>>>>     @Parameter( defaultValue = "${settings}", readonly = true, required
>>>>    = true )
>>>>    private Settings settings;
>>>>  2. Proxy activeProxy = settings.getActiveProxy();
>>>>
>>>
>>> It is pretty good that Robert raised the example with the Javadoc mojo
>>> because it is broken. Our current approach does not scale and the Javadoc
>>> Mojo will fail if your activ proxy is for HTTP, but the resources are HTTPS
>>> and vice versa. Settings needs an overhaul. I constantly suffer from broken
>>> Javadoc URLs at work because of this.
>>>
>>> Upshot: don't rely on #getActiveProxy(), but iterate manually and get
>>> *all* protocols you need.
>>>
>>> Michael
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message