mirror of https://github.com/apache/maven.git
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:
parent
774972e7ec
commit
8120d856c7
|
@ -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() );
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue