maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Osipov (JIRA)" <>
Subject [jira] [Commented] (MJAVADOC-565) web proxy not configured for https
Date Sat, 16 Feb 2019 14:35:00 GMT


Michael Osipov commented on MJAVADOC-565:

Bill, I have checked PR now and I am still not happy, but this isn't related to your PR in
particular. These days people assume that an HTTP proxy will also handle HTTPS via {{CONNECT}}.
I highly doubt that folks will configure a proxy explicitly for {{https}}, in the case they
do, our code is broken becaue {{Settings#getActiveProxy()}} will not take that into consideration.
I know there is no perfect solution, but I would like to take this approach:

* Iterate over all proxies and collect active (first) ones for HTTP and HTTPS
* If HTTPS is availabe, use it for HTTPS as well as for non proxy hosts, but if and only if
proxy for HTTP is not available
* Else use HTTP proxy for both HTTP and HTTPS

Does this make sense? The only other protocol {{URLConnection}} supports is FTP, but I think
no one will use that protocol for Javadoc.

> web proxy not configured for https
> ----------------------------------
>                 Key: MJAVADOC-565
>                 URL:
>             Project: Maven Javadoc Plugin
>          Issue Type: Bug
>    Affects Versions: 3.0.1
>            Reporter: Bill Shannon
>            Assignee: Michael Osipov
>            Priority: Major
> There seems to be some disagreement about how to configure web proxy servers.
> Maven seems to think that the "protocol" element specifies the protocol to use when talking
to the web proxy server, and thus allows only one proxy to be configured in settings.xml. 
(Or rather, only the first configured proxy is used.)  That's not the way proxy servers work.
> The JDK configures web proxy servers based on the protocol that's being proxied.
> For example, when using a <link> to access the JDK javadocs, https is needed. 
The maven-javadoc-plugin invokes the external javadoc command with these arguments:
> {{-J-Dhttp.proxySet=true -J-Dhttp.proxyHost=<proxy-host> -J-Dhttp.proxyPort=<proxy-port>}}
> That only configures the proxy for the http protocol, not the https protocol, and thus
the linked resource can not be accessed.  To configure the proxy to be used for the https
protocol, the following arguments are needed:
> {{-J-Dhttps.proxySet=true -J-Dhttps.proxyHost=<proxy-host> -J-Dhttps.proxyPort=<proxy-port>}}

This message was sent by Atlassian JIRA

View raw message