Class FlowLifecycleParticipant
flow-build-info.json token file after each Maven session ends.
This supplements the deleteOnExit() call in
BuildFrontendUtil, which only fires on JVM exit and therefore never
runs when using the Maven Daemon (mvnd). By hooking into
afterSessionEnd(MavenSession), the token file is cleaned up after
every build invocation even when the daemon JVM stays alive between builds.
The exact token file path is written into the Maven project properties by
BuildFrontendMojo under TOKEN_FILE_PATH_PROPERTY so that a
user-configured resourceOutputDirectory is always respected.
This participant is only active when the plugin is declared with
<extensions>true</extensions> in the user's pom.xml.
The component is registered via META-INF/plexus/components.xml rather
than annotations, since the plexus-component-metadata annotation
processor is not part of this build.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringMaven project property key under whichBuildFrontendMojostores the absolute path of the token file it wrote. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterSessionEnd(org.apache.maven.execution.MavenSession session) Methods inherited from class org.apache.maven.AbstractMavenLifecycleParticipant
afterProjectsRead, afterSessionStart
-
Field Details
-
TOKEN_FILE_PATH_PROPERTY
Maven project property key under whichBuildFrontendMojostores the absolute path of the token file it wrote. Read byafterSessionEnd(MavenSession)to delete the correct file.- See Also:
-
-
Constructor Details
-
FlowLifecycleParticipant
public FlowLifecycleParticipant()
-
-
Method Details
-
afterSessionEnd
public void afterSessionEnd(org.apache.maven.execution.MavenSession session) - Overrides:
afterSessionEndin classorg.apache.maven.AbstractMavenLifecycleParticipant
-