maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdca...@apache.org
Subject svn commit: r1126826 [1/2] - in /maven/maven-3/branches/mirror-group-routing: maven-core/src/main/java/org/apache/maven/ maven-core/src/main/java/org/apache/maven/execution/ maven-embedder/src/main/java/org/apache/maven/cli/
Date Tue, 24 May 2011 02:17:10 GMT
Author: jdcasey
Date: Tue May 24 02:17:09 2011
New Revision: 1126826

URL: http://svn.apache.org/viewvc?rev=1126826&view=rev
Log:
revert a ton of accidental reformats.

Modified:
    maven/maven-3/branches/mirror-group-routing/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
    maven/maven-3/branches/mirror-group-routing/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
    maven/maven-3/branches/mirror-group-routing/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java
    maven/maven-3/branches/mirror-group-routing/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java
    maven/maven-3/branches/mirror-group-routing/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java

Modified: maven/maven-3/branches/mirror-group-routing/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
URL: http://svn.apache.org/viewvc/maven/maven-3/branches/mirror-group-routing/maven-core/src/main/java/org/apache/maven/DefaultMaven.java?rev=1126826&r1=1126825&r2=1126826&view=diff
==============================================================================
--- maven/maven-3/branches/mirror-group-routing/maven-core/src/main/java/org/apache/maven/DefaultMaven.java (original)
+++ maven/maven-3/branches/mirror-group-routing/maven-core/src/main/java/org/apache/maven/DefaultMaven.java Tue May 24 02:17:09 2011
@@ -15,6 +15,22 @@ package org.apache.maven;
  * the License.
  */
 
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
 import org.apache.maven.artifact.ArtifactUtils;
 import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.eventspy.internal.EventSpyDispatcher;
@@ -42,7 +58,6 @@ import org.apache.maven.project.ProjectB
 import org.apache.maven.project.ProjectSorter;
 import org.apache.maven.repository.DelegatingLocalArtifactRepository;
 import org.apache.maven.repository.LocalRepositoryNotAccessibleException;
-import org.apache.maven.repository.mirror.RoutingMirrorSelector;
 import org.apache.maven.settings.Mirror;
 import org.apache.maven.settings.Proxy;
 import org.apache.maven.settings.Server;
@@ -78,35 +93,20 @@ import org.sonatype.aether.util.graph.se
 import org.sonatype.aether.util.graph.selector.OptionalDependencySelector;
 import org.sonatype.aether.util.graph.selector.ScopeDependencySelector;
 import org.sonatype.aether.util.graph.transformer.ChainedDependencyGraphTransformer;
+import org.sonatype.aether.util.graph.transformer.NearestVersionConflictResolver;
 import org.sonatype.aether.util.graph.transformer.ConflictMarker;
 import org.sonatype.aether.util.graph.transformer.JavaDependencyContextRefiner;
 import org.sonatype.aether.util.graph.transformer.JavaEffectiveScopeCalculator;
-import org.sonatype.aether.util.graph.transformer.NearestVersionConflictResolver;
 import org.sonatype.aether.util.graph.traverser.FatArtifactTraverser;
 import org.sonatype.aether.util.repository.ChainedWorkspaceReader;
 import org.sonatype.aether.util.repository.DefaultAuthenticationSelector;
+import org.sonatype.aether.util.repository.DefaultMirrorSelector;
 import org.sonatype.aether.util.repository.DefaultProxySelector;
 
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
 /**
  * @author Jason van Zyl
  */
-@Component( role = Maven.class )
+@Component(role = Maven.class)
 public class DefaultMaven
     implements Maven
 {
@@ -147,7 +147,7 @@ public class DefaultMaven
     @Requirement
     private EventSpyDispatcher eventSpyDispatcher;
 
-    public MavenExecutionResult execute( final MavenExecutionRequest request )
+    public MavenExecutionResult execute( MavenExecutionRequest request )
     {
         MavenExecutionResult result;
 
@@ -155,15 +155,15 @@ public class DefaultMaven
         {
             result = doExecute( populator.populateDefaults( request ) );
         }
-        catch ( final OutOfMemoryError e )
+        catch ( OutOfMemoryError e )
         {
             result = processResult( new DefaultMavenExecutionResult(), e );
         }
-        catch ( final MavenExecutionRequestPopulationException e )
+        catch ( MavenExecutionRequestPopulationException e )
         {
             result = processResult( new DefaultMavenExecutionResult(), e );
         }
-        catch ( final RuntimeException e )
+        catch ( RuntimeException e )
         {
             result =
                 processResult( new DefaultMavenExecutionResult(),
@@ -177,48 +177,46 @@ public class DefaultMaven
         return result;
     }
 
-    @SuppressWarnings( { "ThrowableInstanceNeverThrown", "ThrowableResultOfMethodCallIgnored" } )
-    private MavenExecutionResult doExecute( final MavenExecutionRequest request )
+    @SuppressWarnings({"ThrowableInstanceNeverThrown", "ThrowableResultOfMethodCallIgnored"})
+    private MavenExecutionResult doExecute( MavenExecutionRequest request )
     {
-        // TODO: Need a general way to inject standard properties
+        //TODO: Need a general way to inject standard properties
         if ( request.getStartTime() != null )
         {
-            request.getSystemProperties()
-                   .put( "${build.timestamp}", new SimpleDateFormat( "yyyyMMdd-hhmm" ).format( request.getStartTime() ) );
-        }
-
+            request.getSystemProperties().put( "${build.timestamp}", new SimpleDateFormat( "yyyyMMdd-hhmm" ).format( request.getStartTime() ) );
+        }        
+        
         request.setStartTime( new Date() );
-
-        final MavenExecutionResult result = new DefaultMavenExecutionResult();
+        
+        MavenExecutionResult result = new DefaultMavenExecutionResult();
 
         try
         {
             validateLocalRepository( request );
         }
-        catch ( final LocalRepositoryNotAccessibleException e )
+        catch ( LocalRepositoryNotAccessibleException e )
         {
             return processResult( result, e );
         }
 
-        final DelegatingLocalArtifactRepository delegatingLocalArtifactRepository =
+        DelegatingLocalArtifactRepository delegatingLocalArtifactRepository =
             new DelegatingLocalArtifactRepository( request.getLocalRepository() );
+        
+        request.setLocalRepository( delegatingLocalArtifactRepository );        
 
-        request.setLocalRepository( delegatingLocalArtifactRepository );
-
-        final DefaultRepositorySystemSession repoSession =
-            (DefaultRepositorySystemSession) newRepositorySession( request );
+        DefaultRepositorySystemSession repoSession = (DefaultRepositorySystemSession) newRepositorySession( request );
 
-        final MavenSession session = new MavenSession( container, repoSession, request, result );
+        MavenSession session = new MavenSession( container, repoSession, request, result );
         legacySupport.setSession( session );
 
         try
         {
-            for ( final AbstractMavenLifecycleParticipant listener : getLifecycleParticipants( Collections.<MavenProject> emptyList() ) )
+            for ( AbstractMavenLifecycleParticipant listener : getLifecycleParticipants( Collections.<MavenProject> emptyList() ) )
             {
                 listener.afterSessionStart( session );
             }
         }
-        catch ( final MavenExecutionException e )
+        catch ( MavenExecutionException e )
         {
             return processResult( result, e );
         }
@@ -227,14 +225,14 @@ public class DefaultMaven
 
         request.getProjectBuildingRequest().setRepositorySession( session.getRepositorySession() );
 
-        // TODO: optimize for the single project or no project
-
+        //TODO: optimize for the single project or no project
+        
         List<MavenProject> projects;
         try
         {
-            projects = getProjectsForMavenReactor( request );
+            projects = getProjectsForMavenReactor( request );                                                
         }
-        catch ( final ProjectBuildingException e )
+        catch ( ProjectBuildingException e )
         {
             return processResult( result, e );
         }
@@ -242,40 +240,40 @@ public class DefaultMaven
         session.setProjects( projects );
 
         result.setTopologicallySortedProjects( session.getProjects() );
-
+        
         result.setProject( session.getTopLevelProject() );
 
         try
         {
             Map<String, MavenProject> projectMap;
             projectMap = getProjectMap( session.getProjects() );
-
+    
             // Desired order of precedence for local artifact repositories
             //
             // Reactor
             // Workspace
             // User Local Repository
-            final ReactorReader reactorRepository = new ReactorReader( projectMap );
+            ReactorReader reactorRepository = new ReactorReader( projectMap );
 
             repoSession.setWorkspaceReader( ChainedWorkspaceReader.newInstance( reactorRepository,
                                                                                 repoSession.getWorkspaceReader() ) );
         }
-        catch ( final org.apache.maven.DuplicateProjectException e )
+        catch ( org.apache.maven.DuplicateProjectException e )
         {
             return processResult( result, e );
         }
 
-        final ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
+        ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
         try
         {
-            for ( final AbstractMavenLifecycleParticipant listener : getLifecycleParticipants( projects ) )
+            for ( AbstractMavenLifecycleParticipant listener : getLifecycleParticipants( projects ) )
             {
                 Thread.currentThread().setContextClassLoader( listener.getClass().getClassLoader() );
 
                 listener.afterProjectsRead( session );
             }
         }
-        catch ( final MavenExecutionException e )
+        catch ( MavenExecutionException e )
         {
             return processResult( result, e );
         }
@@ -286,27 +284,27 @@ public class DefaultMaven
 
         try
         {
-            final ProjectSorter projectSorter = new ProjectSorter( session.getProjects() );
+            ProjectSorter projectSorter = new ProjectSorter( session.getProjects() );
 
-            final ProjectDependencyGraph projectDependencyGraph = createDependencyGraph( projectSorter, request );
+            ProjectDependencyGraph projectDependencyGraph = createDependencyGraph( projectSorter, request );
 
             session.setProjects( projectDependencyGraph.getSortedProjects() );
 
             session.setProjectDependencyGraph( projectDependencyGraph );
         }
-        catch ( final CycleDetectedException e )
-        {
-            final String message = "The projects in the reactor contain a cyclic reference: " + e.getMessage();
+        catch ( CycleDetectedException e )
+        {            
+            String message = "The projects in the reactor contain a cyclic reference: " + e.getMessage();
 
-            final ProjectCycleException error = new ProjectCycleException( message, e );
+            ProjectCycleException error = new ProjectCycleException( message, e );
 
             return processResult( result, error );
         }
-        catch ( final DuplicateProjectException e )
+        catch ( DuplicateProjectException e )
         {
             return processResult( result, e );
         }
-        catch ( final MavenExecutionException e )
+        catch ( MavenExecutionException e )
         {
             return processResult( result, e );
         }
@@ -330,15 +328,15 @@ public class DefaultMaven
         return result;
     }
 
-    public RepositorySystemSession newRepositorySession( final MavenExecutionRequest request )
+    public RepositorySystemSession newRepositorySession( MavenExecutionRequest request )
     {
-        final DefaultRepositorySystemSession session = new DefaultRepositorySystemSession();
+        DefaultRepositorySystemSession session = new DefaultRepositorySystemSession();
 
         session.setCache( request.getRepositoryCache() );
 
         session.setIgnoreInvalidArtifactDescriptor( true ).setIgnoreMissingArtifactDescriptor( true );
 
-        final Map<Object, Object> configProps = new LinkedHashMap<Object, Object>();
+        Map<Object, Object> configProps = new LinkedHashMap<Object, Object>();
         configProps.put( ConfigurationProperties.USER_AGENT, getUserAgent() );
         configProps.put( ConfigurationProperties.INTERACTIVE, Boolean.valueOf( request.isInteractiveMode() ) );
         configProps.putAll( request.getSystemProperties() );
@@ -353,7 +351,7 @@ public class DefaultMaven
 
         session.setArtifactTypeRegistry( RepositoryUtils.newArtifactTypeRegistry( artifactHandlerManager ) );
 
-        final LocalRepository localRepo = new LocalRepository( request.getLocalRepository().getBasedir() );
+        LocalRepository localRepo = new LocalRepository( request.getLocalRepository().getBasedir() );
         session.setLocalRepositoryManager( repoSystem.newLocalRepositoryManager( localRepo ) );
 
         if ( request.getWorkspaceReader() != null )
@@ -365,61 +363,57 @@ public class DefaultMaven
             session.setWorkspaceReader( workspaceRepository );
         }
 
-        final DefaultSettingsDecryptionRequest decrypt = new DefaultSettingsDecryptionRequest();
+        DefaultSettingsDecryptionRequest decrypt = new DefaultSettingsDecryptionRequest();
         decrypt.setProxies( request.getProxies() );
         decrypt.setServers( request.getServers() );
-        final SettingsDecryptionResult decrypted = settingsDecrypter.decrypt( decrypt );
+        SettingsDecryptionResult decrypted = settingsDecrypter.decrypt( decrypt );
 
         if ( logger.isDebugEnabled() )
         {
-            for ( final SettingsProblem problem : decrypted.getProblems() )
+            for ( SettingsProblem problem : decrypted.getProblems() )
             {
                 logger.debug( problem.getMessage(), problem.getException() );
             }
         }
 
-        final RoutingMirrorSelector mirrorSelector =
-            new RoutingMirrorSelector( request.getMirrorRoutingTable(), logger );
-        
-        for ( final Mirror mirror : request.getMirrors() )
+        DefaultMirrorSelector mirrorSelector = new DefaultMirrorSelector();
+        for ( Mirror mirror : request.getMirrors() )
         {
             mirrorSelector.add( mirror.getId(), mirror.getUrl(), mirror.getLayout(), false, mirror.getMirrorOf(),
                                 mirror.getMirrorOfLayouts() );
         }
-        
         session.setMirrorSelector( mirrorSelector );
 
-        final DefaultProxySelector proxySelector = new DefaultProxySelector();
-        for ( final Proxy proxy : decrypted.getProxies() )
+        DefaultProxySelector proxySelector = new DefaultProxySelector();
+        for ( Proxy proxy : decrypted.getProxies() )
         {
-            final Authentication proxyAuth = new Authentication( proxy.getUsername(), proxy.getPassword() );
-            proxySelector.add( new org.sonatype.aether.repository.Proxy( proxy.getProtocol(), proxy.getHost(),
-                                                                         proxy.getPort(), proxyAuth ),
-                               proxy.getNonProxyHosts() );
+            Authentication proxyAuth = new Authentication( proxy.getUsername(), proxy.getPassword() );
+            proxySelector.add( new org.sonatype.aether.repository.Proxy( proxy.getProtocol(), proxy.getHost(), proxy.getPort(),
+                                                                proxyAuth ), proxy.getNonProxyHosts() );
         }
         session.setProxySelector( proxySelector );
 
-        final DefaultAuthenticationSelector authSelector = new DefaultAuthenticationSelector();
-        for ( final Server server : decrypted.getServers() )
+        DefaultAuthenticationSelector authSelector = new DefaultAuthenticationSelector();
+        for ( Server server : decrypted.getServers() )
         {
-            final Authentication auth =
+            Authentication auth =
                 new Authentication( server.getUsername(), server.getPassword(), server.getPrivateKey(),
                                     server.getPassphrase() );
             authSelector.add( server.getId(), auth );
 
             if ( server.getConfiguration() != null )
             {
-                final Xpp3Dom dom = (Xpp3Dom) server.getConfiguration();
+                Xpp3Dom dom = (Xpp3Dom) server.getConfiguration();
                 for ( int i = dom.getChildCount() - 1; i >= 0; i-- )
                 {
-                    final Xpp3Dom child = dom.getChild( i );
+                    Xpp3Dom child = dom.getChild( i );
                     if ( "wagonProvider".equals( child.getName() ) )
                     {
                         dom.removeChild( i );
                     }
                 }
 
-                final XmlPlexusConfiguration config = new XmlPlexusConfiguration( dom );
+                XmlPlexusConfiguration config = new XmlPlexusConfiguration( dom );
                 configProps.put( "aether.connector.wagon.config." + server.getId(), config );
             }
 
@@ -428,18 +422,18 @@ public class DefaultMaven
         }
         session.setAuthenticationSelector( authSelector );
 
-        final DependencyTraverser depTraverser = new FatArtifactTraverser();
+        DependencyTraverser depTraverser = new FatArtifactTraverser();
         session.setDependencyTraverser( depTraverser );
 
-        final DependencyManager depManager = new ClassicDependencyManager();
+        DependencyManager depManager = new ClassicDependencyManager();
         session.setDependencyManager( depManager );
 
-        final DependencySelector depFilter =
-            new AndDependencySelector( new ScopeDependencySelector( "test", "provided" ),
-                                       new OptionalDependencySelector(), new ExclusionDependencySelector() );
+        DependencySelector depFilter =
+            new AndDependencySelector( new ScopeDependencySelector( "test", "provided" ), new OptionalDependencySelector(),
+                                     new ExclusionDependencySelector() );
         session.setDependencySelector( depFilter );
 
-        final DependencyGraphTransformer transformer =
+        DependencyGraphTransformer transformer =
             new ChainedDependencyGraphTransformer( new ConflictMarker(), new JavaEffectiveScopeCalculator(),
                                                    new NearestVersionConflictResolver(),
                                                    new JavaDependencyContextRefiner() );
@@ -458,7 +452,7 @@ public class DefaultMaven
 
     private String getUserAgent()
     {
-        final StringBuilder buffer = new StringBuilder( 128 );
+        StringBuilder buffer = new StringBuilder( 128 );
 
         buffer.append( "Apache-Maven/" ).append( getMavenVersion() );
         buffer.append( " (" );
@@ -472,17 +466,16 @@ public class DefaultMaven
 
     private String getMavenVersion()
     {
-        final Properties props = new Properties();
+        Properties props = new Properties();
 
-        final InputStream is =
-            getClass().getResourceAsStream( "/META-INF/maven/org.apache.maven/maven-core/pom.properties" );
+        InputStream is = getClass().getResourceAsStream( "/META-INF/maven/org.apache.maven/maven-core/pom.properties" );
         if ( is != null )
         {
             try
             {
                 props.load( is );
             }
-            catch ( final IOException e )
+            catch ( IOException e )
             {
                 logger.debug( "Failed to read Maven version", e );
             }
@@ -492,11 +485,11 @@ public class DefaultMaven
         return props.getProperty( "version", "unknown-version" );
     }
 
-    @SuppressWarnings( { "ResultOfMethodCallIgnored" } )
-    private void validateLocalRepository( final MavenExecutionRequest request )
+    @SuppressWarnings({"ResultOfMethodCallIgnored"})
+    private void validateLocalRepository( MavenExecutionRequest request )
         throws LocalRepositoryNotAccessibleException
     {
-        final File localRepoDir = request.getLocalRepositoryPath();
+        File localRepoDir = request.getLocalRepositoryPath();
 
         logger.debug( "Using local repository at " + localRepoDir );
 
@@ -508,29 +501,29 @@ public class DefaultMaven
         }
     }
 
-    private Collection<AbstractMavenLifecycleParticipant> getLifecycleParticipants( final Collection<MavenProject> projects )
+    private Collection<AbstractMavenLifecycleParticipant> getLifecycleParticipants( Collection<MavenProject> projects )
     {
-        final Collection<AbstractMavenLifecycleParticipant> lifecycleListeners =
+        Collection<AbstractMavenLifecycleParticipant> lifecycleListeners =
             new LinkedHashSet<AbstractMavenLifecycleParticipant>();
 
-        final ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
+        ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
         try
         {
             try
             {
                 lifecycleListeners.addAll( container.lookupList( AbstractMavenLifecycleParticipant.class ) );
             }
-            catch ( final ComponentLookupException e )
+            catch ( ComponentLookupException e )
             {
                 // this is just silly, lookupList should return an empty list!
                 logger.warn( "Failed to lookup lifecycle participants: " + e.getMessage() );
             }
 
-            final Collection<ClassLoader> scannedRealms = new HashSet<ClassLoader>();
+            Collection<ClassLoader> scannedRealms = new HashSet<ClassLoader>();
 
-            for ( final MavenProject project : projects )
+            for ( MavenProject project : projects )
             {
-                final ClassLoader projectRealm = project.getClassRealm();
+                ClassLoader projectRealm = project.getClassRealm();
 
                 if ( projectRealm != null && scannedRealms.add( projectRealm ) )
                 {
@@ -540,7 +533,7 @@ public class DefaultMaven
                     {
                         lifecycleListeners.addAll( container.lookupList( AbstractMavenLifecycleParticipant.class ) );
                     }
-                    catch ( final ComponentLookupException e )
+                    catch ( ComponentLookupException e )
                     {
                         // this is just silly, lookupList should return an empty list!
                         logger.warn( "Failed to lookup lifecycle participants: " + e.getMessage() );
@@ -556,7 +549,7 @@ public class DefaultMaven
         return lifecycleListeners;
     }
 
-    private MavenExecutionResult processResult( final MavenExecutionResult result, final Throwable e )
+    private MavenExecutionResult processResult( MavenExecutionResult result, Throwable e )
     {
         if ( !result.getExceptions().contains( e ) )
         {
@@ -565,43 +558,41 @@ public class DefaultMaven
 
         return result;
     }
-
-    private List<MavenProject> getProjectsForMavenReactor( final MavenExecutionRequest request )
+    
+    private List<MavenProject> getProjectsForMavenReactor( MavenExecutionRequest request )
         throws ProjectBuildingException
     {
-        final List<MavenProject> projects = new ArrayList<MavenProject>();
+        List<MavenProject> projects =  new ArrayList<MavenProject>();
 
         // We have no POM file.
         //
         if ( request.getPom() == null )
         {
-            final ModelSource modelSource =
-                new UrlModelSource( DefaultMaven.class.getResource( "project/standalone.xml" ) );
-            final MavenProject project =
+            ModelSource modelSource = new UrlModelSource( DefaultMaven.class.getResource( "project/standalone.xml" ) );
+            MavenProject project =
                 projectBuilder.build( modelSource, request.getProjectBuildingRequest() ).getProject();
             project.setExecutionRoot( true );
             projects.add( project );
             request.setProjectPresent( false );
             return projects;
         }
-
-        final List<File> files = Arrays.asList( request.getPom().getAbsoluteFile() );
+        
+        List<File> files = Arrays.asList( request.getPom().getAbsoluteFile() );        
         collectProjects( projects, files, request );
         return projects;
     }
 
-    private Map<String, MavenProject> getProjectMap( final List<MavenProject> projects )
+    private Map<String, MavenProject> getProjectMap( List<MavenProject> projects )
         throws org.apache.maven.DuplicateProjectException
     {
-        final Map<String, MavenProject> index = new LinkedHashMap<String, MavenProject>();
-        final Map<String, List<File>> collisions = new LinkedHashMap<String, List<File>>();
+        Map<String, MavenProject> index = new LinkedHashMap<String, MavenProject>();
+        Map<String, List<File>> collisions = new LinkedHashMap<String, List<File>>();
 
-        for ( final MavenProject project : projects )
+        for ( MavenProject project : projects )
         {
-            final String projectId =
-                ArtifactUtils.key( project.getGroupId(), project.getArtifactId(), project.getVersion() );
+            String projectId = ArtifactUtils.key( project.getGroupId(), project.getArtifactId(), project.getVersion() );
 
-            final MavenProject collision = index.get( projectId );
+            MavenProject collision = index.get( projectId );
 
             if ( collision == null )
             {
@@ -626,25 +617,23 @@ public class DefaultMaven
         if ( !collisions.isEmpty() )
         {
             throw new org.apache.maven.DuplicateProjectException( "Two or more projects in the reactor"
-                            + " have the same identifier, please make sure that <groupId>:<artifactId>:<version>"
-                            + " is unique for each project: " + collisions, collisions );
+                + " have the same identifier, please make sure that <groupId>:<artifactId>:<version>"
+                + " is unique for each project: " + collisions, collisions );
         }
 
         return index;
     }
 
-    private void collectProjects( final List<MavenProject> projects, final List<File> files,
-                                  final MavenExecutionRequest request )
+    private void collectProjects( List<MavenProject> projects, List<File> files, MavenExecutionRequest request )
         throws ProjectBuildingException
     {
-        final ProjectBuildingRequest projectBuildingRequest = request.getProjectBuildingRequest();
+        ProjectBuildingRequest projectBuildingRequest = request.getProjectBuildingRequest();
 
-        final List<ProjectBuildingResult> results =
-            projectBuilder.build( files, request.isRecursive(), projectBuildingRequest );
+        List<ProjectBuildingResult> results = projectBuilder.build( files, request.isRecursive(), projectBuildingRequest );
 
         boolean problems = false;
 
-        for ( final ProjectBuildingResult result : results )
+        for ( ProjectBuildingResult result : results )
         {
             projects.add( result.getProject() );
 
@@ -652,11 +641,11 @@ public class DefaultMaven
             {
                 logger.warn( "" );
                 logger.warn( "Some problems were encountered while building the effective model for "
-                                + result.getProject().getId() );
+                    + result.getProject().getId() );
 
-                for ( final ModelProblem problem : result.getProblems() )
+                for ( ModelProblem problem : result.getProblems() )
                 {
-                    final String location = ModelProblemUtils.formatLocation( problem, result.getProjectId() );
+                    String location = ModelProblemUtils.formatLocation( problem, result.getProjectId() );
                     logger.warn( problem.getMessage() + ( StringUtils.isNotEmpty( location ) ? " @ " + location : "" ) );
                 }
 
@@ -668,30 +657,30 @@ public class DefaultMaven
         {
             logger.warn( "" );
             logger.warn( "It is highly recommended to fix these problems"
-                            + " because they threaten the stability of your build." );
+                + " because they threaten the stability of your build." );
             logger.warn( "" );
             logger.warn( "For this reason, future Maven versions might no"
-                            + " longer support building such malformed projects." );
+                + " longer support building such malformed projects." );
             logger.warn( "" );
         }
     }
 
-    private void validateActivatedProfiles( final List<MavenProject> projects, final List<String> activeProfileIds )
+    private void validateActivatedProfiles( List<MavenProject> projects, List<String> activeProfileIds )
     {
-        final Collection<String> notActivatedProfileIds = new LinkedHashSet<String>( activeProfileIds );
+        Collection<String> notActivatedProfileIds = new LinkedHashSet<String>( activeProfileIds );
 
-        for ( final MavenProject project : projects )
+        for ( MavenProject project : projects )
         {
-            for ( final List<String> profileIds : project.getInjectedProfileIds().values() )
+            for ( List<String> profileIds : project.getInjectedProfileIds().values() )
             {
                 notActivatedProfileIds.removeAll( profileIds );
             }
         }
 
-        for ( final String notActivatedProfileId : notActivatedProfileIds )
+        for ( String notActivatedProfileId : notActivatedProfileIds )
         {
             logger.warn( "The requested profile \"" + notActivatedProfileId
-                            + "\" could not be activated because it does not exist." );
+                + "\" could not be activated because it does not exist." );
         }
     }
 
@@ -700,8 +689,7 @@ public class DefaultMaven
         return logger;
     }
 
-    private ProjectDependencyGraph createDependencyGraph( final ProjectSorter sorter,
-                                                          final MavenExecutionRequest request )
+    private ProjectDependencyGraph createDependencyGraph( ProjectSorter sorter, MavenExecutionRequest request )
         throws MavenExecutionException
     {
         ProjectDependencyGraph graph = new DefaultProjectDependencyGraph( sorter );
@@ -719,9 +707,8 @@ public class DefaultMaven
         return graph;
     }
 
-    private List<MavenProject> trimSelectedProjects( final List<MavenProject> projects,
-                                                     final ProjectDependencyGraph graph,
-                                                     final MavenExecutionRequest request )
+    private List<MavenProject> trimSelectedProjects( List<MavenProject> projects, ProjectDependencyGraph graph,
+                                                     MavenExecutionRequest request )
         throws MavenExecutionException
     {
         List<MavenProject> result = projects;
@@ -734,13 +721,13 @@ public class DefaultMaven
                 reactorDirectory = new File( request.getBaseDirectory() );
             }
 
-            final Collection<MavenProject> selectedProjects = new LinkedHashSet<MavenProject>( projects.size() );
+            Collection<MavenProject> selectedProjects = new LinkedHashSet<MavenProject>( projects.size() );
 
-            for ( final String selector : request.getSelectedProjects() )
+            for ( String selector : request.getSelectedProjects() )
             {
                 MavenProject selectedProject = null;
 
-                for ( final MavenProject project : projects )
+                for ( MavenProject project : projects )
                 {
                     if ( isMatchingProject( project, selector, reactorDirectory ) )
                     {
@@ -756,7 +743,7 @@ public class DefaultMaven
                 else
                 {
                     throw new MavenExecutionException( "Could not find the selected project in the reactor: "
-                                    + selector, request.getPom() );
+                        + selector, request.getPom() );
                 }
             }
 
@@ -784,7 +771,7 @@ public class DefaultMaven
 
             if ( makeUpstream || makeDownstream )
             {
-                for ( final MavenProject selectedProject : new ArrayList<MavenProject>( selectedProjects ) )
+                for ( MavenProject selectedProject : new ArrayList<MavenProject>( selectedProjects ) )
                 {
                     if ( makeUpstream )
                     {
@@ -799,7 +786,7 @@ public class DefaultMaven
 
             result = new ArrayList<MavenProject>( selectedProjects.size() );
 
-            for ( final MavenProject project : projects )
+            for ( MavenProject project : projects )
             {
                 if ( selectedProjects.contains( project ) )
                 {
@@ -811,8 +798,7 @@ public class DefaultMaven
         return result;
     }
 
-    private List<MavenProject> trimResumedProjects( final List<MavenProject> projects,
-                                                    final MavenExecutionRequest request )
+    private List<MavenProject> trimResumedProjects( List<MavenProject> projects, MavenExecutionRequest request )
         throws MavenExecutionException
     {
         List<MavenProject> result = projects;
@@ -825,13 +811,13 @@ public class DefaultMaven
                 reactorDirectory = new File( request.getBaseDirectory() );
             }
 
-            final String selector = request.getResumeFrom();
+            String selector = request.getResumeFrom();
 
             result = new ArrayList<MavenProject>( projects.size() );
 
             boolean resumed = false;
 
-            for ( final MavenProject project : projects )
+            for ( MavenProject project : projects )
             {
                 if ( !resumed && isMatchingProject( project, selector, reactorDirectory ) )
                 {
@@ -847,14 +833,14 @@ public class DefaultMaven
             if ( !resumed )
             {
                 throw new MavenExecutionException( "Could not find project to resume reactor build from: " + selector
-                                + " vs " + projects, request.getPom() );
+                    + " vs " + projects, request.getPom() );
             }
         }
 
         return result;
     }
 
-    private boolean isMatchingProject( final MavenProject project, final String selector, final File reactorDirectory )
+    private boolean isMatchingProject( MavenProject project, String selector, File reactorDirectory )
     {
         // [groupId]:artifactId
         if ( selector.indexOf( ':' ) >= 0 )
@@ -877,7 +863,7 @@ public class DefaultMaven
         // relative path, e.g. "sub", "../sub" or "."
         else if ( reactorDirectory != null )
         {
-            final File selectedProject = new File( new File( reactorDirectory, selector ).toURI().normalize() );
+            File selectedProject = new File( new File( reactorDirectory, selector ).toURI().normalize() );
 
             if ( selectedProject.isFile() )
             {

Modified: maven/maven-3/branches/mirror-group-routing/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java
URL: http://svn.apache.org/viewvc/maven/maven-3/branches/mirror-group-routing/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java?rev=1126826&r1=1126825&r2=1126826&view=diff
==============================================================================
--- maven/maven-3/branches/mirror-group-routing/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java (original)
+++ maven/maven-3/branches/mirror-group-routing/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java Tue May 24 02:17:09 2011
@@ -19,11 +19,16 @@ package org.apache.maven.execution;
  * under the License.
  */
 
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Properties;
+
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.model.Profile;
 import org.apache.maven.project.DefaultProjectBuildingRequest;
 import org.apache.maven.project.ProjectBuildingRequest;
-import org.apache.maven.repository.automirror.MirrorRoutingTable;
 import org.apache.maven.settings.Mirror;
 import org.apache.maven.settings.Proxy;
 import org.apache.maven.settings.Server;
@@ -32,12 +37,6 @@ import org.sonatype.aether.repository.Wo
 import org.sonatype.aether.transfer.TransferListener;
 import org.sonatype.aether.util.DefaultRepositoryCache;
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Properties;
-
 /**
  * @author Jason van Zyl
  */
@@ -139,7 +138,7 @@ public class DefaultMavenExecutionReques
 
     /**
      * Suppress SNAPSHOT updates.
-     * 
+     *
      * @issue MNG-2681
      */
     private boolean noSnapshotUpdates;
@@ -148,9 +147,9 @@ public class DefaultMavenExecutionReques
     {
     }
 
-    public static MavenExecutionRequest copy( final MavenExecutionRequest original )
+    public static MavenExecutionRequest copy( MavenExecutionRequest original )
     {
-        final DefaultMavenExecutionRequest copy = new DefaultMavenExecutionRequest();
+        DefaultMavenExecutionRequest copy = new DefaultMavenExecutionRequest();
         copy.setLocalRepository( original.getLocalRepository() );
         copy.setLocalRepositoryPath( original.getLocalRepositoryPath() );
         copy.setOffline( original.isOffline() );
@@ -166,7 +165,8 @@ public class DefaultMavenExecutionReques
         copy.setUserSettingsFile( original.getUserSettingsFile() );
         copy.setGlobalSettingsFile( original.getGlobalSettingsFile() );
         copy.setUserToolchainsFile( original.getUserToolchainsFile() );
-        copy.setBaseDirectory( ( original.getBaseDirectory() != null ) ? new File( original.getBaseDirectory() ) : null );
+        copy.setBaseDirectory( ( original.getBaseDirectory() != null )
+                               ? new File( original.getBaseDirectory() ) : null );
         copy.setGoals( original.getGoals() );
         copy.setRecursive( original.isRecursive() );
         copy.setPom( original.getPom() );
@@ -185,7 +185,6 @@ public class DefaultMavenExecutionReques
         copy.setWorkspaceReader( original.getWorkspaceReader() );
         copy.setNoSnapshotUpdates( original.isNoSnapshotUpdates() );
         copy.setExecutionListener( original.getExecutionListener() );
-        copy.setMirrorRoutingTable( original.getMirrorRoutingTable() );
         return copy;
     }
 
@@ -283,7 +282,7 @@ public class DefaultMavenExecutionReques
         return interactiveMode;
     }
 
-    public MavenExecutionRequest setActiveProfiles( final List<String> activeProfiles )
+    public MavenExecutionRequest setActiveProfiles( List<String> activeProfiles )
     {
         if ( activeProfiles != null )
         {
@@ -297,7 +296,7 @@ public class DefaultMavenExecutionReques
         return this;
     }
 
-    public MavenExecutionRequest setInactiveProfiles( final List<String> inactiveProfiles )
+    public MavenExecutionRequest setInactiveProfiles( List<String> inactiveProfiles )
     {
         if ( inactiveProfiles != null )
         {
@@ -311,7 +310,7 @@ public class DefaultMavenExecutionReques
         return this;
     }
 
-    public MavenExecutionRequest setRemoteRepositories( final List<ArtifactRepository> remoteRepositories )
+    public MavenExecutionRequest setRemoteRepositories( List<ArtifactRepository> remoteRepositories )
     {
         if ( remoteRepositories != null )
         {
@@ -325,7 +324,7 @@ public class DefaultMavenExecutionReques
         return this;
     }
 
-    public MavenExecutionRequest setPluginArtifactRepositories( final List<ArtifactRepository> pluginArtifactRepositories )
+    public MavenExecutionRequest setPluginArtifactRepositories( List<ArtifactRepository> pluginArtifactRepositories )
     {
         if ( pluginArtifactRepositories != null )
         {
@@ -339,9 +338,9 @@ public class DefaultMavenExecutionReques
         return this;
     }
 
-    public void setProjectBuildingConfiguration( final ProjectBuildingRequest projectBuildingConfiguration )
+    public void setProjectBuildingConfiguration( ProjectBuildingRequest projectBuildingConfiguration )
     {
-        projectBuildingRequest = projectBuildingConfiguration;
+        this.projectBuildingRequest = projectBuildingConfiguration;
     }
 
     public List<String> getActiveProfiles()
@@ -401,28 +400,28 @@ public class DefaultMavenExecutionReques
     //
     // ----------------------------------------------------------------------
 
-    public MavenExecutionRequest setBaseDirectory( final File basedir )
+    public MavenExecutionRequest setBaseDirectory( File basedir )
     {
         this.basedir = basedir;
 
         return this;
     }
 
-    public MavenExecutionRequest setStartTime( final Date startTime )
+    public MavenExecutionRequest setStartTime( Date startTime )
     {
         this.startTime = startTime;
 
         return this;
     }
 
-    public MavenExecutionRequest setShowErrors( final boolean showErrors )
+    public MavenExecutionRequest setShowErrors( boolean showErrors )
     {
         this.showErrors = showErrors;
 
         return this;
     }
 
-    public MavenExecutionRequest setGoals( final List<String> goals )
+    public MavenExecutionRequest setGoals( List<String> goals )
     {
         if ( goals != null )
         {
@@ -436,7 +435,7 @@ public class DefaultMavenExecutionReques
         return this;
     }
 
-    public MavenExecutionRequest setLocalRepository( final ArtifactRepository localRepository )
+    public MavenExecutionRequest setLocalRepository( ArtifactRepository localRepository )
     {
         this.localRepository = localRepository;
 
@@ -448,36 +447,36 @@ public class DefaultMavenExecutionReques
         return this;
     }
 
-    public MavenExecutionRequest setLocalRepositoryPath( final File localRepository )
+    public MavenExecutionRequest setLocalRepositoryPath( File localRepository )
     {
         localRepositoryPath = localRepository;
 
         return this;
     }
 
-    public MavenExecutionRequest setLocalRepositoryPath( final String localRepository )
+    public MavenExecutionRequest setLocalRepositoryPath( String localRepository )
     {
         localRepositoryPath = ( localRepository != null ) ? new File( localRepository ) : null;
 
         return this;
     }
 
-    public MavenExecutionRequest setSystemProperties( final Properties properties )
+    public MavenExecutionRequest setSystemProperties( Properties properties )
     {
         if ( properties != null )
         {
-            systemProperties = new Properties();
-            systemProperties.putAll( properties );
+            this.systemProperties = new Properties();
+            this.systemProperties.putAll( properties );
         }
         else
         {
-            systemProperties = null;
+            this.systemProperties = null;
         }
 
         return this;
     }
 
-    public MavenExecutionRequest setUserProperties( final Properties userProperties )
+    public MavenExecutionRequest setUserProperties( Properties userProperties )
     {
         if ( userProperties != null )
         {
@@ -492,14 +491,14 @@ public class DefaultMavenExecutionReques
         return this;
     }
 
-    public MavenExecutionRequest setReactorFailureBehavior( final String failureBehavior )
+    public MavenExecutionRequest setReactorFailureBehavior( String failureBehavior )
     {
         reactorFailureBehavior = failureBehavior;
 
         return this;
     }
 
-    public MavenExecutionRequest setSelectedProjects( final List<String> selectedProjects )
+    public MavenExecutionRequest setSelectedProjects( List<String> selectedProjects )
     {
         if ( selectedProjects != null )
         {
@@ -513,21 +512,21 @@ public class DefaultMavenExecutionReques
         return this;
     }
 
-    public MavenExecutionRequest setResumeFrom( final String project )
+    public MavenExecutionRequest setResumeFrom( String project )
     {
-        resumeFrom = project;
+        this.resumeFrom = project;
 
         return this;
     }
 
-    public MavenExecutionRequest setMakeBehavior( final String makeBehavior )
+    public MavenExecutionRequest setMakeBehavior( String makeBehavior )
     {
         this.makeBehavior = makeBehavior;
 
         return this;
     }
 
-    public MavenExecutionRequest addActiveProfile( final String profile )
+    public MavenExecutionRequest addActiveProfile( String profile )
     {
         if ( !getActiveProfiles().contains( profile ) )
         {
@@ -537,7 +536,7 @@ public class DefaultMavenExecutionReques
         return this;
     }
 
-    public MavenExecutionRequest addInactiveProfile( final String profile )
+    public MavenExecutionRequest addInactiveProfile( String profile )
     {
         if ( !getInactiveProfiles().contains( profile ) )
         {
@@ -547,9 +546,9 @@ public class DefaultMavenExecutionReques
         return this;
     }
 
-    public MavenExecutionRequest addActiveProfiles( final List<String> profiles )
+    public MavenExecutionRequest addActiveProfiles( List<String> profiles )
     {
-        for ( final String profile : profiles )
+        for ( String profile : profiles )
         {
             addActiveProfile( profile );
         }
@@ -557,9 +556,9 @@ public class DefaultMavenExecutionReques
         return this;
     }
 
-    public MavenExecutionRequest addInactiveProfiles( final List<String> profiles )
+    public MavenExecutionRequest addInactiveProfiles( List<String> profiles )
     {
-        for ( final String profile : profiles )
+        for ( String profile : profiles )
         {
             addInactiveProfile( profile );
         }
@@ -567,7 +566,7 @@ public class DefaultMavenExecutionReques
         return this;
     }
 
-    public MavenExecutionRequest setUseReactor( final boolean reactorActive )
+    public MavenExecutionRequest setUseReactor( boolean reactorActive )
     {
         useReactor = reactorActive;
 
@@ -580,8 +579,7 @@ public class DefaultMavenExecutionReques
     }
 
     /** @deprecated use {@link #setPom(File)} */
-    @Deprecated
-    public MavenExecutionRequest setPomFile( final String pomFilename )
+    public MavenExecutionRequest setPomFile( String pomFilename )
     {
         if ( pomFilename != null )
         {
@@ -591,56 +589,56 @@ public class DefaultMavenExecutionReques
         return this;
     }
 
-    public MavenExecutionRequest setPom( final File pom )
+    public MavenExecutionRequest setPom( File pom )
     {
         this.pom = pom;
 
         return this;
     }
 
-    public MavenExecutionRequest setInteractiveMode( final boolean interactive )
+    public MavenExecutionRequest setInteractiveMode( boolean interactive )
     {
         interactiveMode = interactive;
 
         return this;
     }
 
-    public MavenExecutionRequest setTransferListener( final TransferListener transferListener )
+    public MavenExecutionRequest setTransferListener( TransferListener transferListener )
     {
         this.transferListener = transferListener;
 
         return this;
     }
 
-    public MavenExecutionRequest setLoggingLevel( final int loggingLevel )
+    public MavenExecutionRequest setLoggingLevel( int loggingLevel )
     {
         this.loggingLevel = loggingLevel;
 
         return this;
     }
 
-    public MavenExecutionRequest setOffline( final boolean offline )
+    public MavenExecutionRequest setOffline( boolean offline )
     {
         this.offline = offline;
 
         return this;
     }
 
-    public MavenExecutionRequest setUpdateSnapshots( final boolean updateSnapshots )
+    public MavenExecutionRequest setUpdateSnapshots( boolean updateSnapshots )
     {
         this.updateSnapshots = updateSnapshots;
 
         return this;
     }
 
-    public MavenExecutionRequest setNoSnapshotUpdates( final boolean noSnapshotUpdates )
+    public MavenExecutionRequest setNoSnapshotUpdates( boolean noSnapshotUpdates )
     {
         this.noSnapshotUpdates = noSnapshotUpdates;
 
         return this;
     }
 
-    public MavenExecutionRequest setGlobalChecksumPolicy( final String globalChecksumPolicy )
+    public MavenExecutionRequest setGlobalChecksumPolicy( String globalChecksumPolicy )
     {
         this.globalChecksumPolicy = globalChecksumPolicy;
 
@@ -660,7 +658,7 @@ public class DefaultMavenExecutionReques
         return proxies;
     }
 
-    public MavenExecutionRequest setProxies( final List<Proxy> proxies )
+    public MavenExecutionRequest setProxies( List<Proxy> proxies )
     {
         if ( proxies != null )
         {
@@ -674,14 +672,14 @@ public class DefaultMavenExecutionReques
         return this;
     }
 
-    public MavenExecutionRequest addProxy( final Proxy proxy )
+    public MavenExecutionRequest addProxy( Proxy proxy )
     {
         if ( proxy == null )
         {
             throw new IllegalArgumentException( "proxy missing" );
         }
 
-        for ( final Proxy p : getProxies() )
+        for ( Proxy p : getProxies() )
         {
             if ( p.getId() != null && p.getId().equals( proxy.getId() ) )
             {
@@ -703,7 +701,7 @@ public class DefaultMavenExecutionReques
         return servers;
     }
 
-    public MavenExecutionRequest setServers( final List<Server> servers )
+    public MavenExecutionRequest setServers( List<Server> servers )
     {
         if ( servers != null )
         {
@@ -717,14 +715,14 @@ public class DefaultMavenExecutionReques
         return this;
     }
 
-    public MavenExecutionRequest addServer( final Server server )
+    public MavenExecutionRequest addServer( Server server )
     {
         if ( server == null )
         {
             throw new IllegalArgumentException( "server missing" );
         }
 
-        for ( final Server p : getServers() )
+        for ( Server p : getServers() )
         {
             if ( p.getId() != null && p.getId().equals( server.getId() ) )
             {
@@ -746,7 +744,7 @@ public class DefaultMavenExecutionReques
         return mirrors;
     }
 
-    public MavenExecutionRequest setMirrors( final List<Mirror> mirrors )
+    public MavenExecutionRequest setMirrors( List<Mirror> mirrors )
     {
         if ( mirrors != null )
         {
@@ -760,14 +758,14 @@ public class DefaultMavenExecutionReques
         return this;
     }
 
-    public MavenExecutionRequest addMirror( final Mirror mirror )
+    public MavenExecutionRequest addMirror( Mirror mirror )
     {
         if ( mirror == null )
         {
             throw new IllegalArgumentException( "mirror missing" );
         }
 
-        for ( final Mirror p : getMirrors() )
+        for ( Mirror p : getMirrors() )
         {
             if ( p.getId() != null && p.getId().equals( mirror.getId() ) )
             {
@@ -789,7 +787,7 @@ public class DefaultMavenExecutionReques
         return profiles;
     }
 
-    public MavenExecutionRequest setProfiles( final List<Profile> profiles )
+    public MavenExecutionRequest setProfiles( List<Profile> profiles )
     {
         if ( profiles != null )
         {
@@ -813,7 +811,7 @@ public class DefaultMavenExecutionReques
         return pluginGroups;
     }
 
-    public MavenExecutionRequest setPluginGroups( final List<String> pluginGroups )
+    public MavenExecutionRequest setPluginGroups( List<String> pluginGroups )
     {
         if ( pluginGroups != null )
         {
@@ -827,7 +825,7 @@ public class DefaultMavenExecutionReques
         return this;
     }
 
-    public MavenExecutionRequest addPluginGroup( final String pluginGroup )
+    public MavenExecutionRequest addPluginGroup( String pluginGroup )
     {
         if ( !getPluginGroups().contains( pluginGroup ) )
         {
@@ -837,9 +835,9 @@ public class DefaultMavenExecutionReques
         return this;
     }
 
-    public MavenExecutionRequest addPluginGroups( final List<String> pluginGroups )
+    public MavenExecutionRequest addPluginGroups( List<String> pluginGroups )
     {
-        for ( final String pluginGroup : pluginGroups )
+        for ( String pluginGroup : pluginGroups )
         {
             addPluginGroup( pluginGroup );
         }
@@ -847,7 +845,7 @@ public class DefaultMavenExecutionReques
         return this;
     }
 
-    public MavenExecutionRequest setRecursive( final boolean recursive )
+    public MavenExecutionRequest setRecursive( boolean recursive )
     {
         this.recursive = recursive;
 
@@ -862,7 +860,7 @@ public class DefaultMavenExecutionReques
         return isProjectPresent;
     }
 
-    public MavenExecutionRequest setProjectPresent( final boolean projectPresent )
+    public MavenExecutionRequest setProjectPresent( boolean projectPresent )
     {
         isProjectPresent = projectPresent;
 
@@ -876,7 +874,7 @@ public class DefaultMavenExecutionReques
         return userSettingsFile;
     }
 
-    public MavenExecutionRequest setUserSettingsFile( final File userSettingsFile )
+    public MavenExecutionRequest setUserSettingsFile( File userSettingsFile )
     {
         this.userSettingsFile = userSettingsFile;
 
@@ -888,7 +886,7 @@ public class DefaultMavenExecutionReques
         return globalSettingsFile;
     }
 
-    public MavenExecutionRequest setGlobalSettingsFile( final File globalSettingsFile )
+    public MavenExecutionRequest setGlobalSettingsFile( File globalSettingsFile )
     {
         this.globalSettingsFile = globalSettingsFile;
 
@@ -900,16 +898,16 @@ public class DefaultMavenExecutionReques
         return userToolchainsFile;
     }
 
-    public MavenExecutionRequest setUserToolchainsFile( final File userToolchainsFile )
+    public MavenExecutionRequest setUserToolchainsFile( File userToolchainsFile )
     {
         this.userToolchainsFile = userToolchainsFile;
 
         return this;
     }
 
-    public MavenExecutionRequest addRemoteRepository( final ArtifactRepository repository )
+    public MavenExecutionRequest addRemoteRepository( ArtifactRepository repository )
     {
-        for ( final ArtifactRepository repo : getRemoteRepositories() )
+        for ( ArtifactRepository repo : getRemoteRepositories() )
         {
             if ( repo.getId() != null && repo.getId().equals( repository.getId() ) )
             {
@@ -931,9 +929,9 @@ public class DefaultMavenExecutionReques
         return remoteRepositories;
     }
 
-    public MavenExecutionRequest addPluginArtifactRepository( final ArtifactRepository repository )
+    public MavenExecutionRequest addPluginArtifactRepository( ArtifactRepository repository )
     {
-        for ( final ArtifactRepository repo : getPluginArtifactRepositories() )
+        for ( ArtifactRepository repo : getPluginArtifactRepositories() )
         {
             if ( repo.getId() != null && repo.getId().equals( repository.getId() ) )
             {
@@ -955,7 +953,7 @@ public class DefaultMavenExecutionReques
         return pluginArtifactRepositories;
     }
 
-    // TODO: this does not belong here.
+    //TODO: this does not belong here.
     public ProjectBuildingRequest getProjectBuildingRequest()
     {
         if ( projectBuildingRequest == null )
@@ -976,14 +974,14 @@ public class DefaultMavenExecutionReques
         return projectBuildingRequest;
     }
 
-    public MavenExecutionRequest addProfile( final Profile profile )
+    public MavenExecutionRequest addProfile( Profile profile )
     {
         if ( profile == null )
         {
             throw new IllegalArgumentException( "profile missing" );
         }
 
-        for ( final Profile p : getProfiles() )
+        for ( Profile p : getProfiles() )
         {
             if ( p.getId() != null && p.getId().equals( profile.getId() ) )
             {
@@ -1001,7 +999,7 @@ public class DefaultMavenExecutionReques
         return repositoryCache;
     }
 
-    public MavenExecutionRequest setRepositoryCache( final RepositoryCache repositoryCache )
+    public MavenExecutionRequest setRepositoryCache( RepositoryCache repositoryCache )
     {
         this.repositoryCache = repositoryCache;
 
@@ -1013,7 +1011,7 @@ public class DefaultMavenExecutionReques
         return executionListener;
     }
 
-    public MavenExecutionRequest setExecutionListener( final ExecutionListener executionListener )
+    public MavenExecutionRequest setExecutionListener( ExecutionListener executionListener )
     {
         this.executionListener = executionListener;
 
@@ -1025,7 +1023,7 @@ public class DefaultMavenExecutionReques
         return threadCount;
     }
 
-    public void setThreadCount( final String threadCount )
+    public void setThreadCount( String threadCount )
     {
         this.threadCount = threadCount;
     }
@@ -1040,7 +1038,7 @@ public class DefaultMavenExecutionReques
         return perCoreThreadCount;
     }
 
-    public void setPerCoreThreadCount( final boolean perCoreThreadCount )
+    public void setPerCoreThreadCount( boolean perCoreThreadCount )
     {
         this.perCoreThreadCount = perCoreThreadCount;
     }
@@ -1050,7 +1048,7 @@ public class DefaultMavenExecutionReques
         return workspaceReader;
     }
 
-    public MavenExecutionRequest setWorkspaceReader( final WorkspaceReader workspaceReader )
+    public MavenExecutionRequest setWorkspaceReader( WorkspaceReader workspaceReader )
     {
         this.workspaceReader = workspaceReader;
         return this;
@@ -1061,7 +1059,7 @@ public class DefaultMavenExecutionReques
         return cacheTransferError;
     }
 
-    public MavenExecutionRequest setCacheTransferError( final boolean cacheTransferError )
+    public MavenExecutionRequest setCacheTransferError( boolean cacheTransferError )
     {
         this.cacheTransferError = cacheTransferError;
         return this;
@@ -1072,28 +1070,10 @@ public class DefaultMavenExecutionReques
         return cacheNotFound;
     }
 
-    public MavenExecutionRequest setCacheNotFound( final boolean cacheNotFound )
+    public MavenExecutionRequest setCacheNotFound( boolean cacheNotFound )
     {
         this.cacheNotFound = cacheNotFound;
         return this;
     }
 
-    private MirrorRoutingTable mirrorRoutingTable;
-
-    public synchronized MirrorRoutingTable getMirrorRoutingTable()
-    {
-        if ( mirrorRoutingTable == null )
-        {
-            mirrorRoutingTable = new MirrorRoutingTable();
-        }
-
-        return mirrorRoutingTable;
-    }
-
-    public MavenExecutionRequest setMirrorRoutingTable( final MirrorRoutingTable mirrorRoutingTable )
-    {
-        this.mirrorRoutingTable = mirrorRoutingTable;
-        return this;
-    }
-
 }

Modified: maven/maven-3/branches/mirror-group-routing/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java
URL: http://svn.apache.org/viewvc/maven/maven-3/branches/mirror-group-routing/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java?rev=1126826&r1=1126825&r2=1126826&view=diff
==============================================================================
--- maven/maven-3/branches/mirror-group-routing/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java (original)
+++ maven/maven-3/branches/mirror-group-routing/maven-core/src/main/java/org/apache/maven/execution/MavenExecutionRequest.java Tue May 24 02:17:09 2011
@@ -19,11 +19,15 @@ package org.apache.maven.execution;
  * under the License.
  */
 
+import java.io.File;
+import java.util.Date;
+import java.util.List;
+import java.util.Properties;
+
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
 import org.apache.maven.model.Profile;
 import org.apache.maven.project.ProjectBuildingRequest;
-import org.apache.maven.repository.automirror.MirrorRoutingTable;
 import org.apache.maven.settings.Mirror;
 import org.apache.maven.settings.Proxy;
 import org.apache.maven.settings.Server;
@@ -32,11 +36,6 @@ import org.sonatype.aether.RepositoryCac
 import org.sonatype.aether.repository.WorkspaceReader;
 import org.sonatype.aether.transfer.TransferListener;
 
-import java.io.File;
-import java.util.Date;
-import java.util.List;
-import java.util.Properties;
-
 /**
  * @author Jason van Zyl
  */
@@ -92,17 +91,14 @@ public interface MavenExecutionRequest
 
     // Base directory
     MavenExecutionRequest setBaseDirectory( File basedir );
-
     String getBaseDirectory();
 
     // Timing (remove this)
     MavenExecutionRequest setStartTime( Date start );
-
     Date getStartTime();
 
     // Goals
     MavenExecutionRequest setGoals( List<String> goals );
-
     List<String> getGoals();
 
     // Properties
@@ -110,9 +106,8 @@ public interface MavenExecutionRequest
     /**
      * Sets the system properties to use for interpolation and profile activation. The system properties are collected
      * from the runtime environment like {@link System#getProperties()} and environment variables.
-     * 
-     * @param systemProperties
-     *            The system properties, may be {@code null}.
+     *
+     * @param systemProperties The system properties, may be {@code null}.
      * @return This request, never {@code null}.
      */
     MavenExecutionRequest setSystemProperties( Properties systemProperties );
@@ -120,7 +115,7 @@ public interface MavenExecutionRequest
     /**
      * Gets the system properties to use for interpolation and profile activation. The system properties are collected
      * from the runtime environment like {@link System#getProperties()} and environment variables.
-     * 
+     *
      * @return The system properties, never {@code null}.
      */
     Properties getSystemProperties();
@@ -129,9 +124,8 @@ public interface MavenExecutionRequest
      * Sets the user properties to use for interpolation and profile activation. The user properties have been
      * configured directly by the user on his discretion, e.g. via the {@code -Dkey=value} parameter on the command
      * line.
-     * 
-     * @param userProperties
-     *            The user properties, may be {@code null}.
+     *
+     * @param userProperties The user properties, may be {@code null}.
      * @return This request, never {@code null}.
      */
     MavenExecutionRequest setUserProperties( Properties userProperties );
@@ -140,223 +134,153 @@ public interface MavenExecutionRequest
      * Gets the user properties to use for interpolation and profile activation. The user properties have been
      * configured directly by the user on his discretion, e.g. via the {@code -Dkey=value} parameter on the command
      * line.
-     * 
+     *
      * @return The user properties, never {@code null}.
      */
     Properties getUserProperties();
 
     // Reactor
     MavenExecutionRequest setReactorFailureBehavior( String failureBehavior );
-
     String getReactorFailureBehavior();
 
     MavenExecutionRequest setSelectedProjects( List<String> projects );
-
     List<String> getSelectedProjects();
 
     MavenExecutionRequest setResumeFrom( String project );
-
     String getResumeFrom();
 
     MavenExecutionRequest setMakeBehavior( String makeBehavior );
-
     String getMakeBehavior();
 
     void setThreadCount( String threadCount );
-
     String getThreadCount();
-
     boolean isThreadConfigurationPresent();
-
     void setPerCoreThreadCount( boolean perCoreThreadCount );
-
     boolean isPerCoreThreadCount();
 
     // Recursive (really to just process the top-level POM)
     MavenExecutionRequest setRecursive( boolean recursive );
-
     boolean isRecursive();
 
     MavenExecutionRequest setPom( File pom );
-
     File getPom();
 
     // Errors
     MavenExecutionRequest setShowErrors( boolean showErrors );
-
     boolean isShowErrors();
 
     // Transfer listeners
     MavenExecutionRequest setTransferListener( TransferListener transferListener );
-
     TransferListener getTransferListener();
 
     // Logging
     MavenExecutionRequest setLoggingLevel( int loggingLevel );
-
     int getLoggingLevel();
 
     // Update snapshots
     MavenExecutionRequest setUpdateSnapshots( boolean updateSnapshots );
-
     boolean isUpdateSnapshots();
 
     MavenExecutionRequest setNoSnapshotUpdates( boolean noSnapshotUpdates );
-
     boolean isNoSnapshotUpdates();
 
     // Checksum policy
     MavenExecutionRequest setGlobalChecksumPolicy( String globalChecksumPolicy );
-
     String getGlobalChecksumPolicy();
 
     // Local repository
     MavenExecutionRequest setLocalRepositoryPath( String localRepository );
-
     MavenExecutionRequest setLocalRepositoryPath( File localRepository );
-
     File getLocalRepositoryPath();
-
     MavenExecutionRequest setLocalRepository( ArtifactRepository repository );
-
     ArtifactRepository getLocalRepository();
 
     // Interactive
     MavenExecutionRequest setInteractiveMode( boolean interactive );
-
     boolean isInteractiveMode();
 
     // Offline
     MavenExecutionRequest setOffline( boolean offline );
-
     boolean isOffline();
 
     boolean isCacheTransferError();
-
     MavenExecutionRequest setCacheTransferError( boolean cacheTransferError );
 
     boolean isCacheNotFound();
-
     MavenExecutionRequest setCacheNotFound( boolean cacheNotFound );
 
     // Profiles
     List<Profile> getProfiles();
-
     MavenExecutionRequest addProfile( Profile profile );
-
     MavenExecutionRequest setProfiles( List<Profile> profiles );
-
     MavenExecutionRequest addActiveProfile( String profile );
-
     MavenExecutionRequest addActiveProfiles( List<String> profiles );
-
     MavenExecutionRequest setActiveProfiles( List<String> profiles );
-
     List<String> getActiveProfiles();
-
     MavenExecutionRequest addInactiveProfile( String profile );
-
     MavenExecutionRequest addInactiveProfiles( List<String> profiles );
-
     MavenExecutionRequest setInactiveProfiles( List<String> profiles );
-
     List<String> getInactiveProfiles();
 
     // Proxies
     List<Proxy> getProxies();
-
     MavenExecutionRequest setProxies( List<Proxy> proxies );
-
     MavenExecutionRequest addProxy( Proxy proxy );
 
     // Servers
     List<Server> getServers();
-
     MavenExecutionRequest setServers( List<Server> servers );
-
     MavenExecutionRequest addServer( Server server );
 
     // Mirrors
     List<Mirror> getMirrors();
-
     MavenExecutionRequest setMirrors( List<Mirror> mirrors );
-
     MavenExecutionRequest addMirror( Mirror mirror );
 
     // Plugin groups
     List<String> getPluginGroups();
-
     MavenExecutionRequest setPluginGroups( List<String> pluginGroups );
-
     MavenExecutionRequest addPluginGroup( String pluginGroup );
-
     MavenExecutionRequest addPluginGroups( List<String> pluginGroups );
 
     boolean isProjectPresent();
-
     MavenExecutionRequest setProjectPresent( boolean isProjectPresent );
 
     File getUserSettingsFile();
-
     MavenExecutionRequest setUserSettingsFile( File userSettingsFile );
 
     File getGlobalSettingsFile();
-
     MavenExecutionRequest setGlobalSettingsFile( File globalSettingsFile );
 
     MavenExecutionRequest addRemoteRepository( ArtifactRepository repository );
-
     MavenExecutionRequest addPluginArtifactRepository( ArtifactRepository repository );
 
     /**
      * Set a new list of remote repositories to use the execution request. This is necessary if you perform
      * transformations on the remote repositories being used. For example if you replace existing repositories with
      * mirrors then it's easier to just replace the whole list with a new list of transformed repositories.
-     * 
+     *
      * @param repositories
      * @return
      */
     MavenExecutionRequest setRemoteRepositories( List<ArtifactRepository> repositories );
-
     List<ArtifactRepository> getRemoteRepositories();
 
     MavenExecutionRequest setPluginArtifactRepositories( List<ArtifactRepository> repositories );
-
     List<ArtifactRepository> getPluginArtifactRepositories();
 
     MavenExecutionRequest setRepositoryCache( RepositoryCache repositoryCache );
-
     RepositoryCache getRepositoryCache();
 
     WorkspaceReader getWorkspaceReader();
-
     MavenExecutionRequest setWorkspaceReader( WorkspaceReader workspaceReader );
 
     File getUserToolchainsFile();
-
     MavenExecutionRequest setUserToolchainsFile( File userToolchainsFile );
 
     ExecutionListener getExecutionListener();
-
     MavenExecutionRequest setExecutionListener( ExecutionListener executionListener );
 
     ProjectBuildingRequest getProjectBuildingRequest();
 
-    /**
-     * List of mirrors, URLs they mirror, weight for each mirror, whether it's disabled, etc. This is used to select a
-     * mirror for a particular repository URL.
-     * 
-     * @return The routing table instance for use in this build. Never {@code null}.
-     */
-    MirrorRoutingTable getMirrorRoutingTable();
-
-    /**
-     * Set the list of mirrors, urls they mirror, weight for each mirror, whether it's disabled, etc.
-     * 
-     * @param routingTable
-     *            The {@link MirrorRoutingTable} to use for the current build.
-     * @return This request, never {@code null}.
-     */
-    MavenExecutionRequest setMirrorRoutingTable( MirrorRoutingTable routingTable );
-
 }

Modified: maven/maven-3/branches/mirror-group-routing/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java
URL: http://svn.apache.org/viewvc/maven/maven-3/branches/mirror-group-routing/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java?rev=1126826&r1=1126825&r2=1126826&view=diff
==============================================================================
--- maven/maven-3/branches/mirror-group-routing/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java (original)
+++ maven/maven-3/branches/mirror-group-routing/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java Tue May 24 02:17:09 2011
@@ -19,35 +19,34 @@ package org.apache.maven.execution;
  * under the License.
  */
 
+import java.io.File;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.ConcurrentHashMap;
+
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.RepositoryCache;
 import org.apache.maven.monitor.event.EventDispatcher;
 import org.apache.maven.plugin.descriptor.PluginDescriptor;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.ProjectBuildingRequest;
-import org.apache.maven.repository.automirror.MirrorRoutingTable;
 import org.apache.maven.settings.Settings;
 import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
 import org.sonatype.aether.RepositorySystemSession;
 
-import java.io.File;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.ConcurrentHashMap;
-
 /**
  * @author Jason van Zyl
  */
 public class MavenSession
     implements Cloneable
 {
-    private final PlexusContainer container;
+    private PlexusContainer container;
 
-    private final MavenExecutionRequest request;
+    private MavenExecutionRequest request;
 
     private MavenExecutionResult result;
 
@@ -75,67 +74,66 @@ public class MavenSession
         new ConcurrentHashMap<String, Map<String, Map<String, Object>>>();
 
     @Deprecated
-    public MavenSession( final PlexusContainer container, final MavenExecutionRequest request,
-                         final MavenExecutionResult result, final MavenProject project )
+    public MavenSession( PlexusContainer container, MavenExecutionRequest request, MavenExecutionResult result,
+                         MavenProject project )
     {
-        this( container, request, result, Arrays.asList( new MavenProject[] { project } ) );
+        this( container, request, result, Arrays.asList( new MavenProject[]{project} ) );
     }
 
     @Deprecated
-    public MavenSession( final PlexusContainer container, final Settings settings,
-                         final ArtifactRepository localRepository, final EventDispatcher eventDispatcher,
-                         final ReactorManager unused, final List<String> goals, final String executionRootDir,
-                         final Properties executionProperties, final Date startTime )
+    public MavenSession( PlexusContainer container, Settings settings, ArtifactRepository localRepository,
+                         EventDispatcher eventDispatcher, ReactorManager unused, List<String> goals,
+                         String executionRootDir, Properties executionProperties, Date startTime )
     {
         this( container, settings, localRepository, eventDispatcher, unused, goals, executionRootDir,
               executionProperties, null, startTime );
     }
 
     @Deprecated
-    public MavenSession( final PlexusContainer container, final Settings settings,
-                         final ArtifactRepository localRepository, final EventDispatcher eventDispatcher,
-                         final ReactorManager unused, final List<String> goals, final String executionRootDir,
-                         final Properties executionProperties, final Properties userProperties, final Date startTime )
+    public MavenSession( PlexusContainer container, Settings settings, ArtifactRepository localRepository,
+                         EventDispatcher eventDispatcher, ReactorManager unused, List<String> goals,
+                         String executionRootDir, Properties executionProperties, Properties userProperties,
+                         Date startTime )
     {
         this.container = container;
         this.settings = settings;
         this.executionProperties = executionProperties;
-        request = new DefaultMavenExecutionRequest();
-        request.setUserProperties( userProperties );
-        request.setLocalRepository( localRepository );
-        request.setGoals( goals );
-        request.setBaseDirectory( ( executionRootDir != null ) ? new File( executionRootDir ) : null );
-        request.setStartTime( startTime );
+        this.request = new DefaultMavenExecutionRequest();
+        this.request.setUserProperties( userProperties );
+        this.request.setLocalRepository( localRepository );
+        this.request.setGoals( goals );
+        this.request.setBaseDirectory( ( executionRootDir != null ) ? new File( executionRootDir ) : null );
+        this.request.setStartTime( startTime );
     }
 
     @Deprecated
-    public MavenSession( final PlexusContainer container, final MavenExecutionRequest request,
-                         final MavenExecutionResult result, final List<MavenProject> projects )
+    public MavenSession( PlexusContainer container, MavenExecutionRequest request, MavenExecutionResult result,
+                         List<MavenProject> projects )
     {
         this.container = container;
         this.request = request;
         this.result = result;
-        settings = new SettingsAdapter( request );
+        this.settings = new SettingsAdapter( request );
         setProjects( projects );
     }
 
-    public MavenSession( final PlexusContainer container, final RepositorySystemSession repositorySession,
-                         final MavenExecutionRequest request, final MavenExecutionResult result )
+    public MavenSession( PlexusContainer container, RepositorySystemSession repositorySession, MavenExecutionRequest request,
+                         MavenExecutionResult result )
     {
         this.container = container;
         this.request = request;
         this.result = result;
-        settings = new SettingsAdapter( request );
+        this.settings = new SettingsAdapter( request );
         this.repositorySession = repositorySession;
     }
 
-    public void setProjects( final List<MavenProject> projects )
+    public void setProjects( List<MavenProject> projects )
     {
         if ( !projects.isEmpty() )
         {
-            currentProject = projects.get( 0 );
-            topLevelProject = currentProject;
-            for ( final MavenProject project : projects )
+            this.currentProject = projects.get( 0 );
+            this.topLevelProject = currentProject;
+            for ( MavenProject project : projects )
             {
                 if ( project.isExecutionRoot() )
                 {
@@ -146,8 +144,8 @@ public class MavenSession
         }
         else
         {
-            currentProject = null;
-            topLevelProject = null;
+            this.currentProject = null;
+            this.topLevelProject = null;
         }
         this.projects = projects;
     }
@@ -159,28 +157,28 @@ public class MavenSession
     }
 
     @Deprecated
-    public Object lookup( final String role )
+    public Object lookup( String role )
         throws ComponentLookupException
     {
         return container.lookup( role );
     }
 
     @Deprecated
-    public Object lookup( final String role, final String roleHint )
+    public Object lookup( String role, String roleHint )
         throws ComponentLookupException
     {
         return container.lookup( role, roleHint );
     }
 
     @Deprecated
-    public List<Object> lookupList( final String role )
+    public List<Object> lookupList( String role )
         throws ComponentLookupException
     {
         return container.lookupList( role );
     }
 
     @Deprecated
-    public Map<String, Object> lookupMap( final String role )
+    public Map<String, Object> lookupMap( String role )
         throws ComponentLookupException
     {
         return container.lookupMap( role );
@@ -206,7 +204,7 @@ public class MavenSession
      * Gets the user properties to use for interpolation and profile activation. The user properties have been
      * configured directly by the user on his discretion, e.g. via the {@code -Dkey=value} parameter on the command
      * line.
-     * 
+     *
      * @return The user properties, never {@code null}.
      */
     public Properties getUserProperties()
@@ -217,7 +215,7 @@ public class MavenSession
     /**
      * Gets the system properties to use for interpolation and profile activation. The system properties are collected
      * from the runtime environment like {@link System#getProperties()} and environment variables.
-     * 
+     *
      * @return The system properties, never {@code null}.
      */
     public Properties getSystemProperties()
@@ -272,7 +270,7 @@ public class MavenSession
         return request;
     }
 
-    public void setCurrentProject( final MavenProject currentProject )
+    public void setCurrentProject( MavenProject currentProject )
     {
         this.currentProject = currentProject;
     }
@@ -309,9 +307,9 @@ public class MavenSession
 
     // Backward compat
 
-    public Map<String, Object> getPluginContext( final PluginDescriptor plugin, final MavenProject project )
+    public Map<String, Object> getPluginContext( PluginDescriptor plugin, MavenProject project )
     {
-        final String projectKey = project.getId();
+        String projectKey = project.getId();
 
         Map<String, Map<String, Object>> pluginContextsByKey = pluginContextsByProjectAndPluginKey.get( projectKey );
 
@@ -322,7 +320,7 @@ public class MavenSession
             pluginContextsByProjectAndPluginKey.put( projectKey, pluginContextsByKey );
         }
 
-        final String pluginKey = plugin.getPluginLookupKey();
+        String pluginKey = plugin.getPluginLookupKey();
 
         Map<String, Object> pluginContext = pluginContextsByKey.get( pluginKey );
 
@@ -341,7 +339,7 @@ public class MavenSession
         return projectDependencyGraph;
     }
 
-    public void setProjectDependencyGraph( final ProjectDependencyGraph projectDependencyGraph )
+    public void setProjectDependencyGraph( ProjectDependencyGraph projectDependencyGraph )
     {
         this.projectDependencyGraph = projectDependencyGraph;
     }
@@ -358,13 +356,13 @@ public class MavenSession
         {
             return (MavenSession) super.clone();
         }
-        catch ( final CloneNotSupportedException e )
+        catch ( CloneNotSupportedException e )
         {
             throw new RuntimeException( "Bug", e );
         }
     }
 
-    private String getId( final MavenProject project )
+    private String getId( MavenProject project )
     {
         return project.getGroupId() + ':' + project.getArtifactId() + ':' + project.getVersion();
     }
@@ -385,7 +383,7 @@ public class MavenSession
         return parallel;
     }
 
-    public void setParallel( final boolean parallel )
+    public void setParallel( boolean parallel )
     {
         this.parallel = parallel;
     }
@@ -395,9 +393,4 @@ public class MavenSession
         return repositorySession;
     }
 
-    public MirrorRoutingTable getMirrorRoutingTable()
-    {
-        return request.getMirrorRoutingTable();
-    }
-
 }



Mime
View raw message