return;
}
BuilderCommon.attachToThread( currentProject );
projectExecutionListener.beforeProjectExecution( new ProjectExecutionEvent( session, currentProject ) );
eventCatapult.fire( ExecutionEvent.Type.ProjectStarted, session, null );
MavenExecutionPlan executionPlan =
builderCommon.resolveBuildPlan( session, currentProject, taskSegment, new HashSet<Artifact>() );
List<MojoExecution> mojoExecutions = executionPlan.getMojoExecutions();
projectExecutionListener.beforeProjectLifecycleExecution( new ProjectExecutionEvent( session,
currentProject,
mojoExecutions ) );
mojoExecutor.execute( session, mojoExecutions, reactorContext.getProjectIndex() );
long buildEndTime = System.currentTimeMillis();
projectExecutionListener.afterProjectExecutionSuccess( new ProjectExecutionEvent( session, currentProject,
mojoExecutions ) );
reactorContext.getResult().addBuildSummary( new BuildSuccess( currentProject, buildEndTime - buildStartTime ) );
eventCatapult.fire( ExecutionEvent.Type.ProjectSucceeded, session, null );
}
catch ( Exception e )
{
builderCommon.handleBuildError( reactorContext, rootSession, session, currentProject, e, buildStartTime );
projectExecutionListener.afterProjectExecutionFailure( new ProjectExecutionEvent( session, currentProject,
e ) );
}
finally
{
session.setCurrentProject( null );