mirror of https://github.com/apache/maven.git
[MNG-7391] Fix MojosExecutionStrategy lookup to be able to look into the SessionScope (#693)
This commit is contained in:
parent
7c79e634ce
commit
31193cbf0c
|
@ -35,6 +35,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Named;
|
import javax.inject.Named;
|
||||||
|
import javax.inject.Provider;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import org.apache.maven.artifact.Artifact;
|
import org.apache.maven.artifact.Artifact;
|
||||||
|
@ -82,7 +83,7 @@ public class MojoExecutor
|
||||||
|
|
||||||
private final ReadWriteLock aggregatorLock = new ReentrantReadWriteLock();
|
private final ReadWriteLock aggregatorLock = new ReentrantReadWriteLock();
|
||||||
|
|
||||||
private final MojosExecutionStrategy mojosExecutionStrategy;
|
private final Provider<MojosExecutionStrategy> mojosExecutionStrategy;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public MojoExecutor(
|
public MojoExecutor(
|
||||||
|
@ -90,7 +91,7 @@ public class MojoExecutor
|
||||||
MavenPluginManager mavenPluginManager,
|
MavenPluginManager mavenPluginManager,
|
||||||
LifecycleDependencyResolver lifeCycleDependencyResolver,
|
LifecycleDependencyResolver lifeCycleDependencyResolver,
|
||||||
ExecutionEventCatapult eventCatapult,
|
ExecutionEventCatapult eventCatapult,
|
||||||
MojosExecutionStrategy mojosExecutionStrategy )
|
Provider<MojosExecutionStrategy> mojosExecutionStrategy )
|
||||||
{
|
{
|
||||||
this.pluginManager = pluginManager;
|
this.pluginManager = pluginManager;
|
||||||
this.mavenPluginManager = mavenPluginManager;
|
this.mavenPluginManager = mavenPluginManager;
|
||||||
|
@ -164,7 +165,7 @@ public class MojoExecutor
|
||||||
|
|
||||||
final PhaseRecorder phaseRecorder = new PhaseRecorder( session.getCurrentProject() );
|
final PhaseRecorder phaseRecorder = new PhaseRecorder( session.getCurrentProject() );
|
||||||
|
|
||||||
mojosExecutionStrategy.execute( mojoExecutions, session, new MojoExecutionRunner()
|
mojosExecutionStrategy.get().execute( mojoExecutions, session, new MojoExecutionRunner()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void run( MojoExecution mojoExecution ) throws LifecycleExecutionException
|
public void run( MojoExecution mojoExecution ) throws LifecycleExecutionException
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
|
|
||||||
package org.apache.maven.lifecycle.internal.stub;
|
package org.apache.maven.lifecycle.internal.stub;
|
||||||
|
|
||||||
|
import javax.inject.Provider;
|
||||||
|
|
||||||
import org.apache.maven.execution.MavenSession;
|
import org.apache.maven.execution.MavenSession;
|
||||||
import org.apache.maven.lifecycle.LifecycleExecutionException;
|
import org.apache.maven.lifecycle.LifecycleExecutionException;
|
||||||
import org.apache.maven.lifecycle.internal.DependencyContext;
|
import org.apache.maven.lifecycle.internal.DependencyContext;
|
||||||
|
@ -49,7 +51,7 @@ public class MojoExecutorStub
|
||||||
MavenPluginManager mavenPluginManager,
|
MavenPluginManager mavenPluginManager,
|
||||||
LifecycleDependencyResolver lifeCycleDependencyResolver,
|
LifecycleDependencyResolver lifeCycleDependencyResolver,
|
||||||
ExecutionEventCatapult eventCatapult,
|
ExecutionEventCatapult eventCatapult,
|
||||||
MojosExecutionStrategy mojosExecutionStrategy )
|
Provider<MojosExecutionStrategy> mojosExecutionStrategy )
|
||||||
{
|
{
|
||||||
super( pluginManager, mavenPluginManager, lifeCycleDependencyResolver, eventCatapult, mojosExecutionStrategy );
|
super( pluginManager, mavenPluginManager, lifeCycleDependencyResolver, eventCatapult, mojosExecutionStrategy );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue