From 8120d856c7588661b0985c56f94a4ca3106d9129 Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Mon, 1 Jan 2007 04:45:35 +0000 Subject: [PATCH] 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 --- .../main/java/org/apache/maven/DefaultMaven.java | 11 ----------- ...ultMavenExecutionRequestDefaultsPopulator.java | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java index c45b077e31..519116ea50 100644 --- a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java +++ b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java @@ -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() ); diff --git a/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestDefaultsPopulator.java b/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestDefaultsPopulator.java index 610dfe1412..f26ff24be7 100644 --- a/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestDefaultsPopulator.java +++ b/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestDefaultsPopulator.java @@ -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 ) {