org.apache.maven.tools.plugin.extractor.java
Class JavaMojoDescriptorExtractor
java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.apache.maven.tools.plugin.extractor.java.JavaMojoDescriptorExtractor
- All Implemented Interfaces:
- JavaMojoAnnotation, MojoDescriptorExtractor, org.codehaus.plexus.logging.LogEnabled
@Component(role=org.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor.class,
hint="java")
public class JavaMojoDescriptorExtractor
- extends org.codehaus.plexus.logging.AbstractLogEnabled
- implements MojoDescriptorExtractor, JavaMojoAnnotation
Extracts Mojo descriptors from Java sources.
For more information about the usage tag, have a look to:
http://maven.apache.org/developers/mojo-api-specification.html
- Version:
- $Id: JavaMojoDescriptorExtractor.java 1353231 2012-06-24 08:36:58Z hboutemy $
- See Also:
MojoDescriptor
Field Summary |
static String |
COMPONENT
Deprecated. since 2.4, use JavaMojoAnnotation.COMPONENT instead of. |
static String |
COMPONENT_ROLE
Deprecated. since 2.4, use JavaMojoAnnotation.COMPONENT_ROLE instead of. |
static String |
COMPONENT_ROLEHINT
Deprecated. since 2.4, use JavaMojoAnnotation.COMPONENT_ROLEHINT instead of. |
static String |
CONFIGURATOR
Deprecated. since 2.4, use JavaMojoAnnotation.CONFIGURATOR instead of. |
static String |
DEPRECATED
Deprecated. since 2.4, use JavaMojoAnnotation.DEPRECATED instead of. |
static String |
EXECUTE
Deprecated. since 2.4, use JavaMojoAnnotation.EXECUTE instead of. |
static String |
EXECUTE_GOAL
Deprecated. since 2.4, use JavaMojoAnnotation.EXECUTE_GOAL instead of. |
static String |
EXECUTE_LIFECYCLE
Deprecated. since 2.4, use JavaMojoAnnotation.EXECUTE_LIFECYCLE instead of. |
static String |
EXECUTE_PHASE
Deprecated. since 2.4, use JavaMojoAnnotation.EXECUTE_PHASE instead of. |
static String |
GOAL
Deprecated. since 2.4, use JavaMojoAnnotation.GOAL instead of. |
static String |
GOAL_DESCRIPTION
Deprecated. since 2.4, use JavaMojoAnnotation.DESCRIPTION instead of. |
static String |
GOAL_INHERIT_BY_DEFAULT
Deprecated. since 2.4, use JavaMojoAnnotation.INHERIT_BY_DEFAULT instead of. |
static String |
GOAL_IS_AGGREGATOR
Deprecated. since 2.4, use JavaMojoAnnotation.AGGREGATOR instead of. |
static String |
GOAL_MULTI_EXECUTION_STRATEGY
Deprecated. since 2.4, use JavaMojoAnnotation.MULTI_EXECUTION_STRATEGY instead of. |
static String |
GOAL_REQUIRES_DEPENDENCY_RESOLUTION
Deprecated. since 2.4, use JavaMojoAnnotation.REQUIRES_DEPENDENCY_RESOLUTION instead of. |
static String |
GOAL_REQUIRES_DIRECT_INVOCATION
Deprecated. since 2.4, use JavaMojoAnnotation.REQUIRES_DIRECT_INVOCATION instead of. |
static String |
GOAL_REQUIRES_ONLINE
Deprecated. since 2.4, use JavaMojoAnnotation.REQUIRES_ONLINE instead of. |
static String |
GOAL_REQUIRES_PROJECT
Deprecated. since 2.4, use JavaMojoAnnotation.REQUIRES_PROJECT instead of. |
static String |
GOAL_REQUIRES_REPORTS
Deprecated. since 2.4, use JavaMojoAnnotation.REQUIRES_REPORTS instead of. |
static String |
MAVEN_PLUGIN_INSTANTIATION
Deprecated. since 2.4, use JavaMojoAnnotation.INSTANTIATION_STRATEGY instead of. |
static String |
PARAMETER
Deprecated. since 2.4, use JavaMojoAnnotation.PARAMETER instead of. |
static String |
PARAMETER_ALIAS
Deprecated. since 2.4, use JavaMojoAnnotation.PARAMETER_ALIAS instead of. |
static String |
PARAMETER_DEFAULT_VALUE
Deprecated. since 2.4, use JavaMojoAnnotation.PARAMETER_DEFAULT_VALUE instead of. |
static String |
PARAMETER_EXPRESSION
Deprecated. since 2.4, use JavaMojoAnnotation.PARAMETER_EXPRESSION instead of. |
static String |
PARAMETER_IMPLEMENTATION
Deprecated. since 2.4, use JavaMojoAnnotation.PARAMETER_IMPLEMENTATION instead of. |
static String |
PHASE
Deprecated. since 2.4, use JavaMojoAnnotation.PHASE instead of. |
static String |
READONLY
Deprecated. since 2.4, use JavaMojoAnnotation.READONLY instead of. |
static String |
REQUIRED
Deprecated. since 2.4, use JavaMojoAnnotation.REQUIRED instead of. |
static String |
SINCE
Deprecated. since 2.4, use JavaMojoAnnotation.SINCE instead of. |
Fields inherited from interface org.apache.maven.tools.plugin.extractor.java.JavaMojoAnnotation |
AGGREGATOR, DESCRIPTION, EXECUTION_STATEGY, IMPLEMENTATION, INHERIT_BY_DEFAULT, INSTANTIATION_STRATEGY, LANGUAGE, MULTI_EXECUTION_STRATEGY, PARAMETER_PROPERTY, REQUIRES_DEPENDENCY_COLLECTION, REQUIRES_DEPENDENCY_RESOLUTION, REQUIRES_DIRECT_INVOCATION, REQUIRES_ONLINE, REQUIRES_PROJECT, REQUIRES_REPORTS, THREAD_SAFE |
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 |
MAVEN_PLUGIN_INSTANTIATION
public static final String MAVEN_PLUGIN_INSTANTIATION
- Deprecated. since 2.4, use
JavaMojoAnnotation.INSTANTIATION_STRATEGY
instead of.
- See Also:
- Constant Field Values
CONFIGURATOR
public static final String CONFIGURATOR
- Deprecated. since 2.4, use
JavaMojoAnnotation.CONFIGURATOR
instead of.
- See Also:
- Constant Field Values
PARAMETER
public static final String PARAMETER
- Deprecated. since 2.4, use
JavaMojoAnnotation.PARAMETER
instead of.
- See Also:
- Constant Field Values
PARAMETER_EXPRESSION
public static final String PARAMETER_EXPRESSION
- Deprecated. since 2.4, use
JavaMojoAnnotation.PARAMETER_EXPRESSION
instead of.
- See Also:
- Constant Field Values
PARAMETER_DEFAULT_VALUE
public static final String PARAMETER_DEFAULT_VALUE
- Deprecated. since 2.4, use
JavaMojoAnnotation.PARAMETER_DEFAULT_VALUE
instead of.
- See Also:
- Constant Field Values
PARAMETER_ALIAS
public static final String PARAMETER_ALIAS
- Deprecated. since 2.4, use
JavaMojoAnnotation.PARAMETER_ALIAS
instead of.
- See Also:
- Constant Field Values
SINCE
public static final String SINCE
- Deprecated. since 2.4, use
JavaMojoAnnotation.SINCE
instead of.
- See Also:
- Constant Field Values
PARAMETER_IMPLEMENTATION
public static final String PARAMETER_IMPLEMENTATION
- Deprecated. since 2.4, use
JavaMojoAnnotation.PARAMETER_IMPLEMENTATION
instead of.
- See Also:
- Constant Field Values
REQUIRED
public static final String REQUIRED
- Deprecated. since 2.4, use
JavaMojoAnnotation.REQUIRED
instead of.
- See Also:
- Constant Field Values
DEPRECATED
public static final String DEPRECATED
- Deprecated. since 2.4, use
JavaMojoAnnotation.DEPRECATED
instead of.
- See Also:
- Constant Field Values
READONLY
public static final String READONLY
- Deprecated. since 2.4, use
JavaMojoAnnotation.READONLY
instead of.
- See Also:
- Constant Field Values
GOAL
public static final String GOAL
- Deprecated. since 2.4, use
JavaMojoAnnotation.GOAL
instead of.
- See Also:
- Constant Field Values
PHASE
public static final String PHASE
- Deprecated. since 2.4, use
JavaMojoAnnotation.PHASE
instead of.
- See Also:
- Constant Field Values
EXECUTE
public static final String EXECUTE
- Deprecated. since 2.4, use
JavaMojoAnnotation.EXECUTE
instead of.
- See Also:
- Constant Field Values
EXECUTE_LIFECYCLE
public static final String EXECUTE_LIFECYCLE
- Deprecated. since 2.4, use
JavaMojoAnnotation.EXECUTE_LIFECYCLE
instead of.
- See Also:
- Constant Field Values
EXECUTE_PHASE
public static final String EXECUTE_PHASE
- Deprecated. since 2.4, use
JavaMojoAnnotation.EXECUTE_PHASE
instead of.
- See Also:
- Constant Field Values
EXECUTE_GOAL
public static final String EXECUTE_GOAL
- Deprecated. since 2.4, use
JavaMojoAnnotation.EXECUTE_GOAL
instead of.
- See Also:
- Constant Field Values
GOAL_DESCRIPTION
public static final String GOAL_DESCRIPTION
- Deprecated. since 2.4, use
JavaMojoAnnotation.DESCRIPTION
instead of.
- See Also:
- Constant Field Values
GOAL_REQUIRES_DEPENDENCY_RESOLUTION
public static final String GOAL_REQUIRES_DEPENDENCY_RESOLUTION
- Deprecated. since 2.4, use
JavaMojoAnnotation.REQUIRES_DEPENDENCY_RESOLUTION
instead of.
- See Also:
- Constant Field Values
GOAL_REQUIRES_PROJECT
public static final String GOAL_REQUIRES_PROJECT
- Deprecated. since 2.4, use
JavaMojoAnnotation.REQUIRES_PROJECT
instead of.
- See Also:
- Constant Field Values
GOAL_REQUIRES_REPORTS
public static final String GOAL_REQUIRES_REPORTS
- Deprecated. since 2.4, use
JavaMojoAnnotation.REQUIRES_REPORTS
instead of.
- See Also:
- Constant Field Values
GOAL_IS_AGGREGATOR
public static final String GOAL_IS_AGGREGATOR
- Deprecated. since 2.4, use
JavaMojoAnnotation.AGGREGATOR
instead of.
- See Also:
- Constant Field Values
GOAL_REQUIRES_ONLINE
public static final String GOAL_REQUIRES_ONLINE
- Deprecated. since 2.4, use
JavaMojoAnnotation.REQUIRES_ONLINE
instead of.
- See Also:
- Constant Field Values
GOAL_INHERIT_BY_DEFAULT
public static final String GOAL_INHERIT_BY_DEFAULT
- Deprecated. since 2.4, use
JavaMojoAnnotation.INHERIT_BY_DEFAULT
instead of.
- See Also:
- Constant Field Values
GOAL_MULTI_EXECUTION_STRATEGY
public static final String GOAL_MULTI_EXECUTION_STRATEGY
- Deprecated. since 2.4, use
JavaMojoAnnotation.MULTI_EXECUTION_STRATEGY
instead of.
- See Also:
- Constant Field Values
GOAL_REQUIRES_DIRECT_INVOCATION
public static final String GOAL_REQUIRES_DIRECT_INVOCATION
- Deprecated. since 2.4, use
JavaMojoAnnotation.REQUIRES_DIRECT_INVOCATION
instead of.
- See Also:
- Constant Field Values
COMPONENT
public static final String COMPONENT
- Deprecated. since 2.4, use
JavaMojoAnnotation.COMPONENT
instead of.
- See Also:
- Constant Field Values
COMPONENT_ROLE
public static final String COMPONENT_ROLE
- Deprecated. since 2.4, use
JavaMojoAnnotation.COMPONENT_ROLE
instead of.
- See Also:
- Constant Field Values
COMPONENT_ROLEHINT
public static final String COMPONENT_ROLEHINT
- Deprecated. since 2.4, use
JavaMojoAnnotation.COMPONENT_ROLEHINT
instead of.
- See Also:
- Constant Field Values
JavaMojoDescriptorExtractor
public JavaMojoDescriptorExtractor()
validateParameter
protected void validateParameter(Parameter parameter,
int i)
throws InvalidParameterException
- Parameters:
parameter
- not nulli
- positive number
- Throws:
InvalidParameterException
- if any
createMojoDescriptor
protected MojoDescriptor createMojoDescriptor(JavaClass javaClass)
throws InvalidPluginDescriptorException
- Parameters:
javaClass
- not null
- Returns:
- a mojo descriptor
- Throws:
InvalidPluginDescriptorException
- if any
execute
public List<MojoDescriptor> execute(MavenProject project,
PluginDescriptor pluginDescriptor)
throws ExtractionException,
InvalidPluginDescriptorException
-
- Specified by:
execute
in interface MojoDescriptorExtractor
- Throws:
ExtractionException
InvalidPluginDescriptorException
execute
public List<MojoDescriptor> execute(PluginToolsRequest request)
throws ExtractionException,
InvalidPluginDescriptorException
-
- Specified by:
execute
in interface MojoDescriptorExtractor
- Throws:
ExtractionException
InvalidPluginDescriptorException
discoverClasses
protected JavaClass[] discoverClasses(PluginToolsRequest request)
- Parameters:
request
- The plugin request.
- Returns:
- an array of java class
validate
protected void validate(MojoDescriptor mojoDescriptor)
throws InvalidParameterException
- Parameters:
mojoDescriptor
- not null
- Throws:
InvalidParameterException
- if any
Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.