Skip to content

Commit

Permalink
MNG-5578 cleanup redundant session binding in mojo executin scope
Browse files Browse the repository at this point in the history
Signed-off-by: Igor Fedorenko <[email protected]>
  • Loading branch information
ifedorenko committed Mar 1, 2014
1 parent 3ebab97 commit 48fec94
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
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;
Expand Down Expand Up @@ -169,7 +168,6 @@ protected void configure()
bindScope( MojoExecutionScoped.class, scope );

// standard scope bindings
bind( MavenSession.class ).toProvider( MojoExecutionScope.<MavenSession> seededKeyProvider() ).in( scope );
bind( MavenProject.class ).toProvider( MojoExecutionScope.<MavenProject> seededKeyProvider() ).in( scope );
bind( MojoExecution.class ).toProvider( MojoExecutionScope.<MojoExecution> seededKeyProvider() ).in( scope );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,9 @@ public void executeMojo( MavenSession session, MojoExecution mojoExecution )

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 );
Expand Down

0 comments on commit 48fec94

Please sign in to comment.