try
{
sessionScope.enter();
sessionScope.seed( MavenSession.class, session );
MojoExecutionScope executionScope = lookup( MojoExecutionScope.class );
try
{
executionScope.enter();
executionScope.seed( MavenProject.class, project );
executionScope.seed( MojoExecution.class, execution );
Mojo mojo = lookupConfiguredMojo( session, execution );
mojo.execute();
MojoExecutionEvent event = new MojoExecutionEvent( session, project, execution, mojo );
for ( MojoExecutionListener listener : getContainer().lookupList( MojoExecutionListener.class ) )
{
listener.afterMojoExecutionSuccess( event );
}
}
finally
{
executionScope.exit();
}
}
finally
{
sessionScope.exit();