org.apache.maven.tools.plugin.extractor.java
Class JavaMojoDescriptorExtractor

java.lang.Object
  extended by org.codehaus.plexus.logging.AbstractLogEnabled
      extended by org.apache.maven.tools.plugin.extractor.java.JavaMojoDescriptorExtractor
All Implemented Interfaces:
MojoDescriptorExtractor, org.codehaus.plexus.logging.LogEnabled

public class JavaMojoDescriptorExtractor
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements MojoDescriptorExtractor

Extracts Mojo descriptors from Java sources.


Field Summary
static java.lang.String COMPONENT
           
static java.lang.String COMPONENT_ROLE
           
static java.lang.String COMPONENT_ROLEHINT
           
static java.lang.String CONFIGURATOR
           
static java.lang.String DEPRECATED
           
static java.lang.String EXECUTE
           
static java.lang.String EXECUTE_GOAL
           
static java.lang.String EXECUTE_LIFECYCLE
           
static java.lang.String EXECUTE_PHASE
           
static java.lang.String GOAL
           
static java.lang.String GOAL_DESCRIPTION
           
static java.lang.String GOAL_INHERIT_BY_DEFAULT
           
static java.lang.String GOAL_IS_AGGREGATOR
           
static java.lang.String GOAL_MULTI_EXECUTION_STRATEGY
           
static java.lang.String GOAL_REQUIRES_DEPENDENCY_RESOLUTION
           
static java.lang.String GOAL_REQUIRES_DIRECT_INVOCATION
           
static java.lang.String GOAL_REQUIRES_ONLINE
           
static java.lang.String GOAL_REQUIRES_PROJECT
           
static java.lang.String GOAL_REQUIRES_REPORTS
           
static java.lang.String MAVEN_PLUGIN_INSTANTIATION
           
static java.lang.String PARAMETER
           
static java.lang.String PARAMETER_ALIAS
           
static java.lang.String PARAMETER_DEFAULT_VALUE
           
static java.lang.String PARAMETER_EXPRESSION
           
static java.lang.String PARAMETER_IMPLEMENTATION
          This defines the default implementation in the case the parameter type is an interface.
static java.lang.String PARAMETER_PROPERTY
          This indicates the base name of the bean properties used to read/write this parameter's value.
static java.lang.String PHASE
           
static java.lang.String READONLY
           
static java.lang.String REQUIRED
           
static java.lang.String SINCE
           
 
Fields inherited from interface org.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor
ROLE
 
Constructor Summary
JavaMojoDescriptorExtractor()
           
 
Method Summary
protected  org.apache.maven.plugin.descriptor.MojoDescriptor createMojoDescriptor(com.thoughtworks.qdox.model.JavaClass javaClass)
           
protected  com.thoughtworks.qdox.model.JavaClass[] discoverClasses(org.apache.maven.project.MavenProject project)
           
 java.util.List execute(org.apache.maven.project.MavenProject project, org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
           
protected  void validate(org.apache.maven.plugin.descriptor.MojoDescriptor mojoDescriptor)
           
protected  void validateParameter(org.apache.maven.plugin.descriptor.Parameter parameter, int i)
           
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAVEN_PLUGIN_INSTANTIATION

public static final java.lang.String MAVEN_PLUGIN_INSTANTIATION
See Also:
Constant Field Values

CONFIGURATOR

public static final java.lang.String CONFIGURATOR
See Also:
Constant Field Values

PARAMETER

public static final java.lang.String PARAMETER
See Also:
Constant Field Values

PARAMETER_EXPRESSION

public static final java.lang.String PARAMETER_EXPRESSION
See Also:
Constant Field Values

PARAMETER_DEFAULT_VALUE

public static final java.lang.String PARAMETER_DEFAULT_VALUE
See Also:
Constant Field Values

PARAMETER_ALIAS

public static final java.lang.String PARAMETER_ALIAS
See Also:
Constant Field Values

SINCE

public static final java.lang.String SINCE
See Also:
Constant Field Values

PARAMETER_IMPLEMENTATION

public static final java.lang.String PARAMETER_IMPLEMENTATION
This defines the default implementation in the case the parameter type is an interface.

See Also:
Constant Field Values

PARAMETER_PROPERTY

public static final java.lang.String PARAMETER_PROPERTY
This indicates the base name of the bean properties used to read/write this parameter's value. So:

See Also:
Constant Field Values

REQUIRED

public static final java.lang.String REQUIRED
See Also:
Constant Field Values

DEPRECATED

public static final java.lang.String DEPRECATED
See Also:
Constant Field Values

READONLY

public static final java.lang.String READONLY
See Also:
Constant Field Values

GOAL

public static final java.lang.String GOAL
See Also:
Constant Field Values

PHASE

public static final java.lang.String PHASE
See Also:
Constant Field Values

EXECUTE

public static final java.lang.String EXECUTE
See Also:
Constant Field Values

EXECUTE_LIFECYCLE

public static final java.lang.String EXECUTE_LIFECYCLE
See Also:
Constant Field Values

EXECUTE_PHASE

public static final java.lang.String EXECUTE_PHASE
See Also:
Constant Field Values

EXECUTE_GOAL

public static final java.lang.String EXECUTE_GOAL
See Also:
Constant Field Values

GOAL_DESCRIPTION

public static final java.lang.String GOAL_DESCRIPTION
See Also:
Constant Field Values

GOAL_REQUIRES_DEPENDENCY_RESOLUTION

public static final java.lang.String GOAL_REQUIRES_DEPENDENCY_RESOLUTION
See Also:
Constant Field Values

GOAL_REQUIRES_PROJECT

public static final java.lang.String GOAL_REQUIRES_PROJECT
See Also:
Constant Field Values

GOAL_REQUIRES_REPORTS

public static final java.lang.String GOAL_REQUIRES_REPORTS
See Also:
Constant Field Values

GOAL_IS_AGGREGATOR

public static final java.lang.String GOAL_IS_AGGREGATOR
See Also:
Constant Field Values

GOAL_REQUIRES_ONLINE

public static final java.lang.String GOAL_REQUIRES_ONLINE
See Also:
Constant Field Values

GOAL_INHERIT_BY_DEFAULT

public static final java.lang.String GOAL_INHERIT_BY_DEFAULT
See Also:
Constant Field Values

GOAL_MULTI_EXECUTION_STRATEGY

public static final java.lang.String GOAL_MULTI_EXECUTION_STRATEGY
See Also:
Constant Field Values

GOAL_REQUIRES_DIRECT_INVOCATION

public static final java.lang.String GOAL_REQUIRES_DIRECT_INVOCATION
See Also:
Constant Field Values

COMPONENT

public static final java.lang.String COMPONENT
See Also:
Constant Field Values

COMPONENT_ROLE

public static final java.lang.String COMPONENT_ROLE
See Also:
Constant Field Values

COMPONENT_ROLEHINT

public static final java.lang.String COMPONENT_ROLEHINT
See Also:
Constant Field Values
Constructor Detail

JavaMojoDescriptorExtractor

public JavaMojoDescriptorExtractor()
Method Detail

validateParameter

protected void validateParameter(org.apache.maven.plugin.descriptor.Parameter parameter,
                                 int i)
                          throws org.apache.maven.plugin.descriptor.InvalidParameterException
Throws:
org.apache.maven.plugin.descriptor.InvalidParameterException

createMojoDescriptor

protected org.apache.maven.plugin.descriptor.MojoDescriptor createMojoDescriptor(com.thoughtworks.qdox.model.JavaClass javaClass)
                                                                          throws org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException
Throws:
org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException

execute

public java.util.List execute(org.apache.maven.project.MavenProject project,
                              org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
                       throws ExtractionException,
                              org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException
Specified by:
execute in interface MojoDescriptorExtractor
Throws:
ExtractionException
org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException

discoverClasses

protected com.thoughtworks.qdox.model.JavaClass[] discoverClasses(org.apache.maven.project.MavenProject project)
                                                           throws ExtractionException
Throws:
ExtractionException

validate

protected void validate(org.apache.maven.plugin.descriptor.MojoDescriptor mojoDescriptor)
                 throws org.apache.maven.plugin.descriptor.InvalidParameterException
Throws:
org.apache.maven.plugin.descriptor.InvalidParameterException


Copyright © 2002-2011 Apache Software Foundation. All Rights Reserved.