Skip to content

Commit

Permalink
Fix typo in additionalDependencies documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rfscholte committed Mar 28, 2019
2 parents 3ab15eb + 28ec24a commit fa6d5b1
Showing 1 changed file with 43 additions and 43 deletions.
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

0 comments on commit fa6d5b1

Please sign in to comment.