maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Shannon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MJAVADOC-565) Make proxy configuration properly work for both HTTP and HTTPS
Date Fri, 22 Feb 2019 20:17:00 GMT

    [ https://issues.apache.org/jira/browse/MJAVADOC-565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16775563#comment-16775563
] 

Bill Shannon commented on MJAVADOC-565:
---------------------------------------

Sorry, just getting back to this...

I'm not a proxy expert, but my understanding is that the communication between the client
and the proxy server is always http, never https.  That's why Maven's interpretation of the
proxy configuration seems wrong.

I'm not clear on whether your suggested approach is just for the javadoc plugin or for Maven
in general.  Maven in general needs to be fixed, but I assume we're just talking about the
javadoc plugin here.

If an https proxy is configured but no http proxy is configured, why would you use that proxy
for non proxy hosts?  The non proxy hosts are configured per-protocol.  If you're trying
to connect using https, and there's an https proxy configured, and that proxy configuration
specifies nonProxyHosts, and you're trying to connect to one of those hosts, you should NOT
use the configured proxy.

Because Maven in general only allows one proxy to be active, I have to resort to configuring
that proxy for the http protocol, and then pass command line parameters to configure the https
proxy, e.g., "-Dhttps.proxyHost=<proxy> -Dhttps.proxyPort=80".  Since the JDK doesn't
allow nonProxyHosts to be specified separately for the https protocol, the nonProxyHosts for
the http protocol should be used.

The goal should be that any http or https connections made in the code are consistent with
what the JDK will do when javadoc is invoked separately, and that you pass the appropriate
JDK proxy properties to the separately invoked javadoc tool to achieve that.  And there has
to be a way to configure the proxy for both http and https protocols.  You can either interpret
the single Maven proxy configuration to apply to both, or you can also interpret the JDK properties
passed to Maven to complete the proxy configuration.

And yes, I'm not worried about ftp, and don't really know what to do with it here.

> Make proxy configuration properly work for both HTTP and HTTPS
> --------------------------------------------------------------
>
>                 Key: MJAVADOC-565
>                 URL: https://issues.apache.org/jira/browse/MJAVADOC-565
>             Project: Maven Javadoc Plugin
>          Issue Type: Improvement
>    Affects Versions: 3.0.1
>            Reporter: Bill Shannon
>            Assignee: Michael Osipov
>            Priority: Major
>             Fix For: 3.1.0
>
>
> 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
(v7.6.3#76005)

Mime
View raw message