Class AbstractMavenLifecycleParticipant

java.lang.Object
org.apache.maven.AbstractMavenLifecycleParticipant

public abstract class AbstractMavenLifecycleParticipant extends Object
Allows core extensions to participate in Maven build session lifecycle. All callback methods (will) follow beforeXXX/afterXXX naming pattern to indicate at what lifecycle point it is being called.
Since:
3.0-alpha-3
See Also:
  • Constructor Details

    • AbstractMavenLifecycleParticipant

      public AbstractMavenLifecycleParticipant()
  • Method Details

    • afterProjectsRead

      public void afterProjectsRead(MavenSession session) throws MavenExecutionException
      Invoked after all MavenProject instances have been created. This callback is intended to allow extensions to manipulate MavenProjects before they are sorted and actual build execution starts.
      Parameters:
      session - the Maven session
      Throws:
      MavenExecutionException - in case of issue
    • afterSessionStart

      public void afterSessionStart(MavenSession session) throws MavenExecutionException
      Invoked after MavenSession instance has been created. This callback is intended to allow extensions to inject execution properties, activate profiles and perform similar tasks that affect MavenProject instance construction.
      Parameters:
      session - the Maven session
      Throws:
      MavenExecutionException - in case of issue
    • afterSessionEnd

      public void afterSessionEnd(MavenSession session) throws MavenExecutionException
      Invoked after all projects were built. This callback is intended to allow extensions to perform cleanup of any allocated external resources after the build. It is invoked on best-effort basis and may be missed due to an Error or RuntimeException in Maven core code.
      Parameters:
      session - the Maven session
      Throws:
      MavenExecutionException - in case of issue
      Since:
      3.2.1, MNG-5389