[
https://issues.apache.org/jira/browse/MJAVADOC-483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16011486#comment-16011486
]
Laird Nelson commented on MJAVADOC-483:
---------------------------------------
Here are changes I made (I cannot get the plugin to compile; I figure something
here is better than nothing). This starts at line {{3536}} in
{{AbstractJavadocMojo.java}}. As mentioned, I cannot tell if this compiles but
you should get the idea:
{code:title=AbstractJavadocMojo.java line 3536}
List<Proxy> proxies = settings.getProxies();
if ( proxies != null && !proxies.isEmpty() )
{
for ( Proxy activeProxy : proxies )
{
if (activeProxy != null && activeProxy.isActive())
{
String protocol = StringUtils.isNotEmpty( activeProxy.getProtocol()
) ? activeProxy.getProtocol() + "." : "";
if ( StringUtils.isNotEmpty( activeProxy.getHost() ) )
{
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() + "\"" );
}
}
}
}
}
}
{code}
> Needs support for https.proxySet etc.
> -------------------------------------
>
> Key: MJAVADOC-483
> URL: https://issues.apache.org/jira/browse/MJAVADOC-483
> Project: Maven Javadoc Plugin
> Issue Type: Bug
> Components: javadoc
> Affects Versions: 2.10.4
> Reporter: Laird Nelson
>
> I work at a ginormous company that has a proxy server. I have an active
> {{<proxy>}} in my {{.m2/settings.xml}} for the {{http}} protocol. The
> {{maven-javadoc-plugin}} picks this up fine.
> Weirdly, the {{javadoc}} invocation _also_ requires the {{https}} proxy to be
> set. There is no way to accomplish this with the {{maven-javadoc-plugin}}.
> IMHO it should see if there is an active {{<proxy>}} element whose protocol
> is {{https}} as well.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)