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 <[email protected]> wrote:

Am 2018-05-21 um 19:53 schrieb Mark Raynsford:
On 2018-05-21T19:46:26 +0200
"Robert Scholte" <[email protected]> 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/AbstractJavadocMojo.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: [email protected]
For additional commands, e-mail: [email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to