org.apache.maven.lifecycle.binding
Interface LifecycleBindingManager

All Known Implementing Classes:
DefaultLifecycleBindingManager

public interface LifecycleBindingManager

Responsible for the gross construction of LifecycleBindings, or mappings of MojoBinding instances to different parts of the three lifecycles: clean, build, and site. Also, handles transcribing these LifecycleBindings instances into lists of MojoBinding's, which can be consumed by the LifecycleExecutor.

Author:
jdcasey

Field Summary
static java.lang.String ROLE
           
 
Method Summary
 LifecycleBindings getBindingsForPackaging(MavenProject project, MavenSession session)
          Retrieve the LifecycleBindings given by the lifecycle mapping component/file for the project's packaging.
 LifecycleBindings getDefaultBindings(MavenProject project)
          Construct the LifecycleBindings for the default lifecycle mappings, including injection of configuration from the project into each MojoBinding, where appropriate.
 java.util.List<Lifecycle> getLifecycles()
           
 LifecycleBindings getPluginLifecycleOverlay(PluginDescriptor pluginDescriptor, java.lang.String lifecycleId, MavenProject project)
          Construct the LifecycleBindings that constitute the mojos mapped to the lifecycles by an overlay specified in a plugin.
 LifecycleBindings getProjectCustomBindings(MavenProject project, MavenSession session, java.util.Set unresolvableBindings)
          Construct the LifecycleBindings that constitute the extra mojos bound to the lifecycle within the POM itself.
 java.util.List getReportBindings(MavenProject project, MavenSession session)
          Retrieve the list of MojoBinding instances that correspond to the reports configured for the specified project.
 void resolveUnbindableMojos(java.util.Set unbindableMojos, MavenProject project, MavenSession session, LifecycleBindings lifecycleBindings)
          Go through the set of unbindable mojos provided (these are MojoBinding instancess coming from the project as custom bindings for which we failed to determine a phase to bind them during getProjectCustomBindings(MavenProject, MavenSession, Set)).
 

Field Detail

ROLE

static final java.lang.String ROLE
Method Detail

getDefaultBindings

LifecycleBindings getDefaultBindings(MavenProject project)
                                     throws LifecycleSpecificationException
Construct the LifecycleBindings for the default lifecycle mappings, including injection of configuration from the project into each MojoBinding, where appropriate.

Throws:
LifecycleSpecificationException

getBindingsForPackaging

LifecycleBindings getBindingsForPackaging(MavenProject project,
                                          MavenSession session)
                                          throws LifecycleLoaderException,
                                                 LifecycleSpecificationException
Retrieve the LifecycleBindings given by the lifecycle mapping component/file for the project's packaging. Any applicable mojo configuration will be injected into the LifecycleBindings from the POM.

Parameters:
session -
Throws:
LifecycleLoaderException
LifecycleSpecificationException

getProjectCustomBindings

LifecycleBindings getProjectCustomBindings(MavenProject project,
                                           MavenSession session,
                                           java.util.Set unresolvableBindings)
                                           throws LifecycleLoaderException,
                                                  LifecycleSpecificationException
Construct the LifecycleBindings that constitute the extra mojos bound to the lifecycle within the POM itself.

Throws:
LifecycleLoaderException
LifecycleSpecificationException

getPluginLifecycleOverlay

LifecycleBindings getPluginLifecycleOverlay(PluginDescriptor pluginDescriptor,
                                            java.lang.String lifecycleId,
                                            MavenProject project)
                                            throws LifecycleLoaderException,
                                                   LifecycleSpecificationException
Construct the LifecycleBindings that constitute the mojos mapped to the lifecycles by an overlay specified in a plugin. Inject mojo configuration from the POM into all appropriate MojoBinding instances.

Throws:
LifecycleLoaderException
LifecycleSpecificationException

getReportBindings

java.util.List getReportBindings(MavenProject project,
                                 MavenSession session)
                                 throws LifecycleLoaderException,
                                        LifecycleSpecificationException
Retrieve the list of MojoBinding instances that correspond to the reports configured for the specified project. Inject all appropriate configuration from the POM for each MojoBinding, using the following precedence rules:
  1. report-set-level configuration
  2. reporting-level configuration
  3. execution-level configuration
  4. plugin-level configuration

Throws:
LifecycleLoaderException
LifecycleSpecificationException

resolveUnbindableMojos

void resolveUnbindableMojos(java.util.Set unbindableMojos,
                            MavenProject project,
                            MavenSession session,
                            LifecycleBindings lifecycleBindings)
                            throws LifecycleSpecificationException
Go through the set of unbindable mojos provided (these are MojoBinding instancess coming from the project as custom bindings for which we failed to determine a phase to bind them during getProjectCustomBindings(MavenProject, MavenSession, Set)). For each MojoBinding, attempt to resolve it again, and if successful, extract the default phase name from the MojoDescriptor.

Throws:
LifecycleSpecificationException - In case the plugin cannot be resolved, the plugin doesn't contain the specified mojo, or the mojo doesn't have a default phase.

getLifecycles

java.util.List<Lifecycle> getLifecycles()


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.