Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1689,7 +1689,7 @@ public abstract class AbstractJavadocMojo
* <additionalDependency>
* <groupId>geronimo-spec</groupId>
* <artifactId>geronimo-spec-jta</artifactId>
* <version>1.0.1B-rc4:</version>
* <version>1.0.1B-rc4</version>
* </additionalDependency>
* </additionalDependencies>
* </pre>
Expand Down Expand Up @@ -3647,67 +3647,67 @@ private void addMemoryArg( Commandline cmd, String arg, String memory )
*/
private void addProxyArg( Commandline cmd )
{
if ( settings == null || settings.getProxies().isEmpty() )
if ( settings == null || settings.getProxies().isEmpty() )
{
return;
}

Map<String, Proxy> activeProxies = new HashMap<>();
Map<String, Proxy> activeProxies = new HashMap<>();

for ( Proxy proxy : settings.getProxies() )
for ( Proxy proxy : settings.getProxies() )
{
if ( proxy.isActive() )
{
String protocol = proxy.getProtocol();
if ( proxy.isActive() )
{
String protocol = proxy.getProtocol();

if ( !activeProxies.containsKey( protocol ) )
if ( !activeProxies.containsKey( protocol ) )
{
activeProxies.put( protocol, proxy );
}
}
activeProxies.put( protocol, proxy );
}
}
}

if ( activeProxies.containsKey( "https" ) )
{
Proxy httpsProxy = activeProxies.get( "https" );
if ( StringUtils.isNotEmpty( httpsProxy.getHost() ) )
if ( activeProxies.containsKey( "https" ) )
{
Proxy httpsProxy = activeProxies.get( "https" );
if ( StringUtils.isNotEmpty( httpsProxy.getHost() ) )
{
cmd.createArg().setValue( "-J-Dhttps.proxyHost=" + httpsProxy.getHost() );
cmd.createArg().setValue( "-J-Dhttps.proxyPort=" + httpsProxy.getPort() );

if ( StringUtils.isNotEmpty( httpsProxy.getNonProxyHosts() )
&& ( !activeProxies.containsKey( "http" )
|| StringUtils.isEmpty( activeProxies.get( "http" ).getNonProxyHosts() ) ) )
{
cmd.createArg().setValue( "-J-Dhttp.nonProxyHosts=\""
+ httpsProxy.getNonProxyHosts().replace( "|", "^|" ) + "\"" );
}
cmd.createArg().setValue( "-J-Dhttps.proxyHost=" + httpsProxy.getHost() );
cmd.createArg().setValue( "-J-Dhttps.proxyPort=" + httpsProxy.getPort() );
if ( StringUtils.isNotEmpty( httpsProxy.getNonProxyHosts() )
&& ( !activeProxies.containsKey( "http" )
|| StringUtils.isEmpty( activeProxies.get( "http" ).getNonProxyHosts() ) ) )
{
cmd.createArg().setValue( "-J-Dhttp.nonProxyHosts=\""
+ httpsProxy.getNonProxyHosts().replace( "|", "^|" ) + "\"" );
}
}
}

if ( activeProxies.containsKey( "http" ) )
{
Proxy httpProxy = activeProxies.get( "http" );
if ( StringUtils.isNotEmpty( httpProxy.getHost() ) )
{
cmd.createArg().setValue( "-J-Dhttp.proxyHost=" + httpProxy.getHost() );
cmd.createArg().setValue( "-J-Dhttp.proxyPort=" + httpProxy.getPort() );
}
if ( activeProxies.containsKey( "http" ) )
{
Proxy httpProxy = activeProxies.get( "http" );
if ( StringUtils.isNotEmpty( httpProxy.getHost() ) )
{
cmd.createArg().setValue( "-J-Dhttp.proxyHost=" + httpProxy.getHost() );
cmd.createArg().setValue( "-J-Dhttp.proxyPort=" + httpProxy.getPort() );

if ( !activeProxies.containsKey( "https" ) )
if ( !activeProxies.containsKey( "https" ) )
{
cmd.createArg().setValue( "-J-Dhttps.proxyHost=" + httpProxy.getHost() );
cmd.createArg().setValue( "-J-Dhttps.proxyPort=" + httpProxy.getPort() );
}
cmd.createArg().setValue( "-J-Dhttps.proxyHost=" + httpProxy.getHost() );
cmd.createArg().setValue( "-J-Dhttps.proxyPort=" + httpProxy.getPort() );
}

if ( StringUtils.isNotEmpty( httpProxy.getNonProxyHosts() ) )
if ( StringUtils.isNotEmpty( httpProxy.getNonProxyHosts() ) )
{
cmd.createArg().setValue( "-J-Dhttp.nonProxyHosts=\""
+ httpProxy.getNonProxyHosts().replace( "|", "^|" ) + "\"" );
cmd.createArg().setValue( "-J-Dhttp.nonProxyHosts=\""
+ httpProxy.getNonProxyHosts().replace( "|", "^|" ) + "\"" );
}
}
}

// We bravely ignore FTP because no one (probably) uses FTP for Javadoc
// We bravely ignore FTP because no one (probably) uses FTP for Javadoc
}

/**
Expand Down