[MNG-4664] Minor patches needed to run Maven3 with the replacement Guice-Plexus container

Submitted by: Stuart McCulloch

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@941224 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2010-05-05 09:49:08 +00:00
parent f9002b1821
commit d126a29bc7
3 changed files with 12 additions and 7 deletions

View File

@ -14,13 +14,12 @@
*/
package org.apache.maven.lifecycle.internal;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
import org.apache.maven.project.MavenProject;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@ -80,10 +79,17 @@ public String toGraph()
{
StringBuilder result = new StringBuilder();
Multimap<MavenProject, BuildLogItem> multiMap = ArrayListMultimap.create();
Map<MavenProject, Collection<BuildLogItem>> multiMap = new HashMap<MavenProject, Collection<BuildLogItem>>();
for ( BuildLogItem builtLogItem : items )
{
multiMap.put( builtLogItem.getProject(), builtLogItem );
MavenProject project = builtLogItem.getProject();
Collection<BuildLogItem> bag = multiMap.get( project );
if ( bag == null )
{
bag = new ArrayList<BuildLogItem>();
multiMap.put( project, bag );
}
bag.add( builtLogItem );
}
result.append( "digraph build" );

View File

@ -37,7 +37,7 @@
* <p/>
* NOTE: This class is not part of any public api and can be changed or deleted without prior notice.
*/
@Component(role = LifecyclePluginAnalyzerImpl.class)
@Component(role = LifeCyclePluginAnalyzer.class)
public class LifecyclePluginAnalyzerImpl
implements LifeCyclePluginAnalyzer
{

View File

@ -21,7 +21,6 @@
import org.apache.maven.lifecycle.internal.LifecycleDependencyResolver;
import org.apache.maven.lifecycle.internal.LifecycleExecutionPlanCalculator;
import org.apache.maven.lifecycle.internal.LifecycleModuleBuilder;
import org.apache.maven.lifecycle.internal.LifecyclePluginAnalyzerImpl;
import org.apache.maven.lifecycle.internal.LifecycleTaskSegmentCalculator;
import org.apache.maven.lifecycle.internal.MojoExecutor;
import org.codehaus.plexus.component.annotations.Requirement;
@ -66,7 +65,7 @@ protected void setUp()
lifeCycleBuilder = lookup( LifecycleModuleBuilder.class );
lifeCycleDependencyResolver = lookup( LifecycleDependencyResolver.class );
lifeCycleExecutionPlanCalculator = lookup( LifecycleExecutionPlanCalculator.class );
lifeCyclePluginAnalyzer = lookup( LifecyclePluginAnalyzerImpl.class );
lifeCyclePluginAnalyzer = lookup( LifeCyclePluginAnalyzer.class );
lifeCycleTaskSegmentCalculator = lookup( LifecycleTaskSegmentCalculator.class );
lookup( ExceptionHandler.class );
}