Package org.apache.maven
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.
-
-
Constructor Summary
Constructors Constructor Description AbstractMavenLifecycleParticipant()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterProjectsRead(MavenSession session)
Invoked after all MavenProject instances have been created.void
afterSessionEnd(MavenSession session)
Invoked after all projects were built.void
afterSessionStart(MavenSession session)
Invoked after MavenSession instance has been created.
-
-
-
Method Detail
-
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.- Throws:
MavenExecutionException
-
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.- Throws:
MavenExecutionException
-
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.- Throws:
MavenExecutionException
- Since:
- 3.2.1, MNG-5389
-
-