Package org.apache.maven
Class AbstractMavenLifecycleParticipant
java.lang.Object
org.apache.maven.AbstractMavenLifecycleParticipant
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.
-
Constructor Details
-
AbstractMavenLifecycleParticipant
public AbstractMavenLifecycleParticipant()
-
-
Method Details
-
afterProjectsRead
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
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
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
-