org.apache.maven.lifecycle.binding
Class DefaultMojoBindingFactory

java.lang.Object
  extended by org.apache.maven.lifecycle.binding.DefaultMojoBindingFactory
All Implemented Interfaces:
MojoBindingFactory

@Component(role=MojoBindingFactory.class)
public class DefaultMojoBindingFactory
extends java.lang.Object
implements MojoBindingFactory

Responsible for constructing or parsing MojoBinding instances from one of several sources, potentially using the PluginLoader to resolve any plugin prefixes first.

Author:
jdcasey

Field Summary
 
Fields inherited from interface org.apache.maven.lifecycle.binding.MojoBindingFactory
ROLE
 
Constructor Summary
DefaultMojoBindingFactory()
           
 
Method Summary
 MojoBinding createMojoBinding(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String goal, MavenProject project)
          Create a new MojoBinding instance with the specified information, and inject POM configurations appropriate to that mojo before returning it.
 MojoBinding parseMojoBinding(java.lang.String bindingSpec)
          Simplified version of MojoBindingFactory#parseMojoBinding(String, MavenProject, boolean) which assumes the project is null and prefixes are not allowed.
 MojoBinding parseMojoBinding(java.lang.String bindingSpec, MavenProject project)
          Simplified version of MojoBindingFactory.parseMojoBinding(String, MavenProject, MavenSession, boolean) which assumes that prefixes are not allowed.
 MojoBinding parseMojoBinding(java.lang.String bindingSpec, MavenProject project, MavenSession session, boolean allowPrefixReference)
          Parse the specified mojo string into a MojoBinding, optionally allowing plugin-prefix references.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMojoBindingFactory

public DefaultMojoBindingFactory()
Method Detail

parseMojoBinding

public MojoBinding parseMojoBinding(java.lang.String bindingSpec,
                                    MavenProject project,
                                    MavenSession session,
                                    boolean allowPrefixReference)
                             throws LifecycleSpecificationException,
                                    LifecycleLoaderException
Parse the specified mojo string into a MojoBinding, optionally allowing plugin-prefix references. If a plugin-prefix is allowed and used, resolve the prefix and use the resulting PluginDescriptor to set groupId and artifactId on the MojoBinding instance.

Specified by:
parseMojoBinding in interface MojoBindingFactory
Throws:
LifecycleSpecificationException
LifecycleLoaderException

createMojoBinding

public MojoBinding createMojoBinding(java.lang.String groupId,
                                     java.lang.String artifactId,
                                     java.lang.String version,
                                     java.lang.String goal,
                                     MavenProject project)
Create a new MojoBinding instance with the specified information, and inject POM configurations appropriate to that mojo before returning it.

Specified by:
createMojoBinding in interface MojoBindingFactory

parseMojoBinding

public MojoBinding parseMojoBinding(java.lang.String bindingSpec)
                             throws LifecycleSpecificationException
Simplified version of MojoBindingFactory#parseMojoBinding(String, MavenProject, boolean) which assumes the project is null and prefixes are not allowed. This method will never result in the PluginLoader being used to resolve the PluginDescriptor.

Specified by:
parseMojoBinding in interface MojoBindingFactory
Throws:
LifecycleSpecificationException

parseMojoBinding

public MojoBinding parseMojoBinding(java.lang.String bindingSpec,
                                    MavenProject project)
                             throws LifecycleSpecificationException
Description copied from interface: MojoBindingFactory
Simplified version of MojoBindingFactory.parseMojoBinding(String, MavenProject, MavenSession, boolean) which assumes that prefixes are not allowed. This method will never result in the PluginLoader being used to resolve the PluginDescriptor.

Specified by:
parseMojoBinding in interface MojoBindingFactory
Throws:
LifecycleSpecificationException


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