o collect all WagonManager configuration in one place

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@491531 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2007-01-01 04:45:35 +00:00
parent 774972e7ec
commit 8120d856c7
2 changed files with 13 additions and 13 deletions

View File

@ -17,7 +17,6 @@ package org.apache.maven;
*/
import org.apache.maven.artifact.manager.WagonManager;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
import org.apache.maven.artifact.resolver.ArtifactResolutionException;
@ -93,12 +92,8 @@ public class DefaultMaven
protected RuntimeInformation runtimeInformation;
protected WagonManager wagonManager;
protected LoggerManager loggerManager;
protected MavenTools mavenTools;
protected ArtifactRepositoryFactory artifactRepositoryFactory;
private static final long MB = 1024 * 1024;
@ -122,12 +117,6 @@ public class DefaultMaven
loggerManager.setThreshold( request.getLoggingLevel() );
wagonManager.setInteractive( request.isInteractiveMode() );
wagonManager.setDownloadMonitor( request.getTransferListener() );
wagonManager.setOnline( !request.getSettings().isOffline() );
request.setStartTime( new Date() );
EventDispatcher dispatcher = new DefaultEventDispatcher( request.getEventMonitors() );

View File

@ -95,7 +95,7 @@ public class DefaultMavenExecutionRequestDefaultsPopulator
artifactRepositoryFactory.setGlobalChecksumPolicy( request.getGlobalChecksumPolicy() );
// Wagon
// Wagon
if ( request.getSettings().isOffline() )
{
@ -107,7 +107,18 @@ public class DefaultMavenExecutionRequestDefaultsPopulator
{
wagonManager = (WagonManager) container.lookup( WagonManager.ROLE );
wagonManager.setOnline( false );
if ( request.isOffline() )
{
wagonManager.setOnline( false );
}
else
{
wagonManager.setInteractive( request.isInteractiveMode() );
wagonManager.setDownloadMonitor( request.getTransferListener() );
wagonManager.setOnline( true );
}
}
catch ( ComponentLookupException e )
{