From 69777c2ea26c12476487b9624eea9d0d31e828bc Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Sat, 21 Feb 2009 16:15:26 +0000 Subject: [PATCH] o remove wagon manager from the request populator git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@746531 13f79535-47bb-0310-9956-ffa450edef68 --- ...DefaultMavenExecutionRequestPopulator.java | 28 ++++++++----------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java b/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java index c57771c83e..9290c7e711 100644 --- a/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java +++ b/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java @@ -28,7 +28,6 @@ import java.util.Properties; import org.apache.maven.Maven; import org.apache.maven.RepositorySystem; import org.apache.maven.artifact.InvalidRepositoryException; -import org.apache.maven.artifact.manager.WagonManager; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy; import org.apache.maven.embedder.Configuration; @@ -414,10 +413,6 @@ public class DefaultMavenExecutionRequestPopulator private void resolveParameters( Settings settings ) throws ComponentLookupException, ComponentLifecycleException, SettingsConfigurationException { - WagonManager wagonManager = container.lookup( WagonManager.class ); - - try - { Proxy proxy = settings.getActiveProxy(); if ( proxy != null ) @@ -434,10 +429,18 @@ public class DefaultMavenExecutionRequestPopulator { Server server = (Server) i.next(); - String pass = securityDispatcher.decrypt( server.getPassword() ); + String pass; + String phrase; + try + { + pass = securityDispatcher.decrypt( server.getPassword() ); + phrase = securityDispatcher.decrypt( server.getPassphrase() ); + } + catch (SecDispatcherException e) + { + throw new SettingsConfigurationException( "Error decrypting server password/passphrase.", e ); + } - String phrase = securityDispatcher.decrypt( server.getPassphrase() ); - mavenTools.addAuthenticationInfo( server.getId(), server.getUsername(), pass, server.getPrivateKey(), phrase ); mavenTools.addPermissionInfo( server.getId(), server.getFilePermissions(), server.getDirectoryPermissions() ); @@ -451,15 +454,6 @@ public class DefaultMavenExecutionRequestPopulator mavenTools.addMirror( mirror.getId(), mirror.getMirrorOf(), mirror.getUrl() ); } - } - catch ( SecDispatcherException e ) - { - throw new SettingsConfigurationException( e.getMessage() ); - } - finally - { - container.release( wagonManager ); - } } /**