SecDispatcher sd = null;
try
{
Proxy proxy = settings.getActiveProxy();
try
{
sd = (SecDispatcher) container.lookup( SecDispatcher.ROLE, "maven" );
}
catch (Exception e)
{
getLogger().warn( "Security features are disabled. Cannot find plexus component "+SecDispatcher.ROLE + ":maven" );
line();
}
if ( proxy != null )
{
if ( proxy.getHost() == null )
{
throw new SettingsConfigurationException( "Proxy in settings.xml has no host" );
}
String pass = proxy.getPassword();
if ( sd != null )
{
try
{
pass = sd.decrypt( pass );
}
catch ( SecDispatcherException e )
{
reportSecurityConfigurationError( "password for proxy '" + proxy.getId() + "'", e );
}
}
wagonManager.addProxy( proxy.getProtocol(), proxy.getHost(), proxy.getPort(), proxy.getUsername(),
pass, proxy.getNonProxyHosts() );
}
for ( Iterator i = settings.getServers().iterator(); i.hasNext(); )
{
Server server = (Server) i.next();