Package org.apache.maven.execution

Examples of org.apache.maven.execution.ProjectExecutionEvent


                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 );
View Full Code Here


                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
        {
            sessionScope.exit();
View Full Code Here

                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
        {
            sessionScope.exit();
View Full Code Here

TOP

Related Classes of org.apache.maven.execution.ProjectExecutionEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.