[ https://issues.apache.org/jira/browse/MJAVADOC-565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16744500#comment-16744500 ]
Bill Shannon commented on MJAVADOC-565: --------------------------------------- Here's a patch that fixes this problem. {{--- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java}} {{+++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java}} {{@@ -3605,11 +3605,42 @@ public abstract class AbstractJavadocMojo}} {{ }} {{ if ( StringUtils.isNotEmpty( activeProxy.getUsername() ) )}} {{ {}} {{- cmd.createArg().setValue( "-J-Dhttp.proxyUser=\"" + activeProxy.getUsername() + "\"" );}} {{+ cmd.createArg().setValue( "-J-D" + protocol + "proxyUser=\"" + activeProxy.getUsername() + "\"" );}} {{ }} {{ if ( StringUtils.isNotEmpty( activeProxy.getPassword() ) )}} {{ {}} {{- cmd.createArg().setValue( "-J-Dhttp.proxyPassword=\"" + activeProxy.getPassword() + "\"" );}} {{+ cmd.createArg().setValue(}} {{+ "-J-D" + protocol + "proxyPassword=\"" + activeProxy.getPassword() + "\"" );}} {{+ }}} {{+ }}} {{+}} {{+ if ( protocol.equalsIgnoreCase( "http." ) )}} {{+ {}} {{+ // use the same proxy for the https protocol as well}} {{+ protocol = "https.";}} {{+ cmd.createArg().setValue( "-J-D" + protocol + "proxySet=true" );}} {{+ cmd.createArg().setValue( "-J-D" + protocol + "proxyHost=" + activeProxy.getHost() );}} {{+}} {{+ if ( activeProxy.getPort() > 0 )}} {{+ {}} {{+ cmd.createArg().setValue( "-J-D" + protocol + "proxyPort=" + activeProxy.getPort() );}} {{+ }}} {{+}} {{+ if ( StringUtils.isNotEmpty( activeProxy.getNonProxyHosts() ) )}} {{+ {}} {{+ cmd.createArg().setValue(}} {{+ "-J-D" + protocol + "nonProxyHosts=\"" + activeProxy.getNonProxyHosts() + "\"" );}} {{+ }}} {{+}} {{+ if ( StringUtils.isNotEmpty( activeProxy.getUsername() ) )}} {{+ {}} {{+ cmd.createArg().setValue( "-J-D" + protocol + "proxyUser=\"" + activeProxy.getUsername() + "\"" );}} {{+}} {{+ if ( StringUtils.isNotEmpty( activeProxy.getPassword() ) )}} {{+ {}} {{+ cmd.createArg().setValue(}} {{+ "-J-D" + protocol + "proxyPassword=\"" + activeProxy.getPassword() + "\"" );}} {{+ }}} {{ }}} {{ }}} {{ }}} > web proxy not configured for https > ---------------------------------- > > Key: MJAVADOC-565 > URL: https://issues.apache.org/jira/browse/MJAVADOC-565 > Project: Maven Javadoc Plugin > Issue Type: Bug > Affects Versions: 3.0.1 > Reporter: Bill Shannon > 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 (v7.6.3#76005)