From 48fec9440dab16d11aadd45db3216b3a5ea3f564 Mon Sep 17 00:00:00 2001 From: Igor Fedorenko Date: Fri, 28 Feb 2014 21:15:42 -0500 Subject: [PATCH] MNG-5578 cleanup redundant session binding in mojo executin scope Signed-off-by: Igor Fedorenko --- .../maven/execution/scope/internal/MojoExecutionScope.java | 2 -- .../org/apache/maven/plugin/DefaultBuildPluginManager.java | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScope.java b/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScope.java index 61d01ce9ef..fc8b1e6129 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScope.java +++ b/maven-core/src/main/java/org/apache/maven/execution/scope/internal/MojoExecutionScope.java @@ -25,7 +25,6 @@ import java.util.Map; import javax.inject.Named; import javax.inject.Singleton; -import org.apache.maven.execution.MavenSession; import org.apache.maven.execution.MojoExecutionEvent; import org.apache.maven.execution.MojoExecutionListener; import org.apache.maven.execution.scope.MojoExecutionScoped; @@ -169,7 +168,6 @@ public class MojoExecutionScope bindScope( MojoExecutionScoped.class, scope ); // standard scope bindings - bind( MavenSession.class ).toProvider( MojoExecutionScope. seededKeyProvider() ).in( scope ); bind( MavenProject.class ).toProvider( MojoExecutionScope. seededKeyProvider() ).in( scope ); bind( MojoExecution.class ).toProvider( MojoExecutionScope. seededKeyProvider() ).in( scope ); } diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java index 257bf174fa..c61c9fb2a8 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultBuildPluginManager.java @@ -113,10 +113,9 @@ public class DefaultBuildPluginManager try { - scope.seed( MavenSession.class, session ); scope.seed( MavenProject.class, project ); scope.seed( MojoExecution.class, mojoExecution ); - + mojo = mavenPluginManager.getConfiguredMojo( Mojo.class, session, mojoExecution ); legacySupport.setSession( session );