Package org.apache.maven.buildcache
Class LifecyclePhasesHelper
java.lang.Object
org.apache.maven.execution.AbstractExecutionListener
org.apache.maven.buildcache.LifecyclePhasesHelper
- All Implemented Interfaces:
org.apache.maven.execution.ExecutionListener
@Named
public class LifecyclePhasesHelper
extends org.apache.maven.execution.AbstractExecutionListener
-
Constructor Summary
ConstructorsConstructorDescriptionLifecyclePhasesHelper(org.apache.maven.execution.MavenSession session, org.apache.maven.lifecycle.DefaultLifecycles defaultLifecycles, org.apache.maven.lifecycle.Lifecycle cleanLifecycle) -
Method Summary
Modifier and TypeMethodDescriptionvoidforkedProjectFailed(org.apache.maven.execution.ExecutionEvent event) voidforkedProjectStarted(org.apache.maven.execution.ExecutionEvent event) voidforkedProjectSucceeded(org.apache.maven.execution.ExecutionEvent event) List<org.apache.maven.plugin.MojoExecution>getCachedSegment(org.apache.maven.project.MavenProject project, List<org.apache.maven.plugin.MojoExecution> mojoExecutions, Build build) Computes the list of mojos executions that are cached.List<org.apache.maven.plugin.MojoExecution>getCleanSegment(org.apache.maven.project.MavenProject project, List<org.apache.maven.plugin.MojoExecution> mojoExecutions) Computes the list of mojos executions in the clean phaseList<org.apache.maven.plugin.MojoExecution>getPostCachedSegment(org.apache.maven.project.MavenProject project, List<org.apache.maven.plugin.MojoExecution> mojoExecutions, Build build) Computes the list of mojos executions that will have to be executed after cache restoration.voidinit()booleanisForkedProject(org.apache.maven.project.MavenProject project) booleanisLaterPhase(String phase, String other) Check if the given phase is later than the other in maven lifecycle.booleanisLaterPhaseThanBuild(String phase, Build build) booleanisLaterPhaseThanClean(String phase) Check if the given phase is later than the clean lifecycle.resolveHighestLifecyclePhase(org.apache.maven.project.MavenProject project, List<org.apache.maven.plugin.MojoExecution> mojoExecutions) Methods inherited from class org.apache.maven.execution.AbstractExecutionListener
forkFailed, forkStarted, forkSucceeded, mojoFailed, mojoSkipped, mojoStarted, mojoSucceeded, projectDiscoveryStarted, projectFailed, projectSkipped, projectStarted, projectSucceeded, sessionEnded, sessionStarted
-
Constructor Details
-
LifecyclePhasesHelper
@Inject public LifecyclePhasesHelper(org.apache.maven.execution.MavenSession session, org.apache.maven.lifecycle.DefaultLifecycles defaultLifecycles, @Named("clean") org.apache.maven.lifecycle.Lifecycle cleanLifecycle)
-
-
Method Details
-
init
-
forkedProjectStarted
public void forkedProjectStarted(org.apache.maven.execution.ExecutionEvent event) - Specified by:
forkedProjectStartedin interfaceorg.apache.maven.execution.ExecutionListener- Overrides:
forkedProjectStartedin classorg.apache.maven.execution.AbstractExecutionListener
-
forkedProjectSucceeded
public void forkedProjectSucceeded(org.apache.maven.execution.ExecutionEvent event) - Specified by:
forkedProjectSucceededin interfaceorg.apache.maven.execution.ExecutionListener- Overrides:
forkedProjectSucceededin classorg.apache.maven.execution.AbstractExecutionListener
-
forkedProjectFailed
public void forkedProjectFailed(org.apache.maven.execution.ExecutionEvent event) - Specified by:
forkedProjectFailedin interfaceorg.apache.maven.execution.ExecutionListener- Overrides:
forkedProjectFailedin classorg.apache.maven.execution.AbstractExecutionListener
-
resolveHighestLifecyclePhase
-
isLaterPhaseThanClean
Check if the given phase is later than the clean lifecycle. -
isLaterPhaseThanBuild
-
isLaterPhase
Check if the given phase is later than the other in maven lifecycle. Example: isLaterPhase("install", "clean") returns true; -
getCleanSegment
public List<org.apache.maven.plugin.MojoExecution> getCleanSegment(org.apache.maven.project.MavenProject project, List<org.apache.maven.plugin.MojoExecution> mojoExecutions) Computes the list of mojos executions in the clean phase -
getCachedSegment
public List<org.apache.maven.plugin.MojoExecution> getCachedSegment(org.apache.maven.project.MavenProject project, List<org.apache.maven.plugin.MojoExecution> mojoExecutions, Build build) Computes the list of mojos executions that are cached. -
getPostCachedSegment
public List<org.apache.maven.plugin.MojoExecution> getPostCachedSegment(org.apache.maven.project.MavenProject project, List<org.apache.maven.plugin.MojoExecution> mojoExecutions, Build build) Computes the list of mojos executions that will have to be executed after cache restoration. -
isForkedProject
public boolean isForkedProject(org.apache.maven.project.MavenProject project)
-