Package org.apache.maven.execution

Examples of org.apache.maven.execution.ExecutionEvent


    {
        ExecutionListener listener = session.getRequest().getExecutionListener();

        if ( listener != null )
        {
            ExecutionEvent event = new DefaultExecutionEvent( eventType, session, mojoExecution, exception );

            switch ( eventType )
            {
                case ProjectDiscoveryStarted:
                    listener.projectDiscoveryStarted( event );
View Full Code Here


    {
        ExecutionListener listener = session.getRequest().getExecutionListener();

        if ( listener != null )
        {
            ExecutionEvent event = new DefaultLifecycleEvent( session, null );

            catapult.fire( listener, event );
        }
    }
View Full Code Here

    {
        ExecutionListener listener = session.getRequest().getExecutionListener();

        if ( listener != null )
        {
            ExecutionEvent event = new DefaultLifecycleEvent( session, mojoExecution );

            catapult.fire( listener, event );
        }
    }
View Full Code Here

    {
        ExecutionListener listener = session.getRequest().getExecutionListener();

        if ( listener != null )
        {
            ExecutionEvent event = new DefaultLifecycleEvent( session, mojoExecution );

            catapult.fire( listener, event );
        }
    }
View Full Code Here

    {
        ExecutionListener listener = session.getRequest().getExecutionListener();

        if ( listener != null )
        {
            ExecutionEvent event = new DefaultLifecycleEvent( session, null );

            catapult.fire( listener, event );
        }
    }
View Full Code Here

    {
        ExecutionListener listener = session.getRequest().getExecutionListener();

        if ( listener != null )
        {
            ExecutionEvent event = new DefaultExecutionEvent( eventType, session, mojoExecution );

            switch ( eventType )
            {
                case ProjectDiscoveryStarted:
                    listener.projectDiscoveryStarted( event );
View Full Code Here

    {
        ExecutionListener listener = session.getRequest().getExecutionListener();

        if ( listener != null )
        {
            ExecutionEvent event = new DefaultLifecycleEvent( session, null );

            catapult.fire( listener, event );
        }
    }
View Full Code Here

    {
        ExecutionListener listener = session.getRequest().getExecutionListener();

        if ( listener != null )
        {
            ExecutionEvent event = new DefaultLifecycleEvent( session, mojoExecution );

            catapult.fire( listener, event );
        }
    }
View Full Code Here

  }

  @Override
  public void onEvent(Object event) throws Exception {
    if (event instanceof ExecutionEvent) {
      ExecutionEvent executionEvent = (ExecutionEvent) event;
      if (executionEvent.getType() == ExecutionEvent.Type.SessionStarted) {
        //
        //
        //
        sessionProfile = new SessionProfile();
      } else if (executionEvent.getType() == ExecutionEvent.Type.SessionEnded) {
        //
        //
        //
        sessionProfile.stop();
        if (System.getProperty(TESLA_PROFILE) != null) {
          renderer.render(sessionProfile);
        }
      } else if (executionEvent.getType() == ExecutionEvent.Type.ProjectStarted) {
        //
        // We need to collect the mojoExecutions within each project
        //
        projectProfile = new ProjectProfile(executionEvent.getProject());
      } else if (executionEvent.getType() == ExecutionEvent.Type.ProjectSucceeded || executionEvent.getType() == ExecutionEvent.Type.ProjectFailed) {
        //
        //
        //
        projectProfile.stop();
        sessionProfile.addProjectProfile(projectProfile);
      } else if (executionEvent.getType() == ExecutionEvent.Type.MojoStarted) {
        String phase = executionEvent.getMojoExecution().getLifecyclePhase();
        //
        // Create a new phase profile if one doesn't exist or the phase has changed.
        //
        if (phaseProfile == null) {
          phaseProfile = new PhaseProfile(phase);
        } else if (!phaseProfile.getPhase().equals(phase)) {
          phaseProfile.stop();
          projectProfile.addPhaseProfile(phaseProfile);
          phaseProfile = new PhaseProfile(phase);
        }
        mojoProfile = new MojoProfile(executionEvent.getMojoExecution());
      } else if (executionEvent.getType() == ExecutionEvent.Type.MojoSucceeded || executionEvent.getType() == ExecutionEvent.Type.MojoFailed) {
        //
        //
        //
        mojoProfile.stop();
        phaseProfile.addMojoProfile(mojoProfile);
View Full Code Here

    {
        ExecutionListener listener = session.getRequest().getExecutionListener();

        if ( listener != null )
        {
            ExecutionEvent event = new DefaultLifecycleEvent( session, mojoExecution );

            catapult.fire( listener, event );
        }
    }
View Full Code Here

TOP

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

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.