Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@
import org.apache.maven.plugin.PluginManagerException;
import org.apache.maven.plugin.descriptor.MojoDescriptor;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.PlexusContainer;
import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;
import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
import org.codehaus.plexus.util.StringUtils;
import org.eclipse.aether.SessionData;

Expand Down Expand Up @@ -88,7 +90,7 @@ public class MojoExecutor
private final ReadWriteLock aggregatorLock = new ReentrantReadWriteLock();

@Requirement
private MojosExecutionStrategy mojosExecutionStrategy;
private PlexusContainer container;

public MojoExecutor()
{
Expand Down Expand Up @@ -159,7 +161,16 @@ public void execute( final MavenSession session,

final PhaseRecorder phaseRecorder = new PhaseRecorder( session.getCurrentProject() );

mojosExecutionStrategy.execute( mojoExecutions, session, new MojoExecutionRunner()
MojosExecutionStrategy strategy;
try
{
strategy = container.lookup( MojosExecutionStrategy.class );
}
catch ( ComponentLookupException e )
{
throw new IllegalStateException( "Unable to lookup MojosExecutionStrategy", e );
}
strategy.execute( mojoExecutions, session, new MojoExecutionRunner()
{
@Override
public void run( MojoExecution mojoExecution ) throws LifecycleExecutionException
Expand Down