org.apache.maven.tools.plugin.extractor
Class AbstractScriptedMojoDescriptorExtractor
java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.apache.maven.tools.plugin.extractor.AbstractScriptedMojoDescriptorExtractor
- All Implemented Interfaces:
- org.codehaus.plexus.logging.LogEnabled, MojoDescriptorExtractor
- public abstract class AbstractScriptedMojoDescriptorExtractor
- extends org.codehaus.plexus.logging.AbstractLogEnabled
- implements MojoDescriptorExtractor
- Version:
- $Id: AbstractScriptedMojoDescriptorExtractor.java 746400 2009-02-20 22:42:13Z bentmann $
- Author:
- jdcasey
| 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 |
AbstractScriptedMojoDescriptorExtractor
public AbstractScriptedMojoDescriptorExtractor()
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
- Execute the mojo extraction.
- Specified by:
execute in interface MojoDescriptorExtractor
- Returns:
- a list of mojo descriptors.
- Throws:
ExtractionException - if any
org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException - if any
execute
public java.util.List execute(PluginToolsRequest request)
throws ExtractionException,
org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException
- Execute the mojo extraction.
- Specified by:
execute in interface MojoDescriptorExtractor
- Parameters:
request - The PluginToolsRequest containing information for the extraction process.
- Returns:
- a list of mojo descriptors.
- Throws:
org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException - if any
ExtractionException - if any
copyScriptsToOutputDirectory
protected void copyScriptsToOutputDirectory(java.util.Map scriptFilesKeyedByBasedir,
java.lang.String outputDirectory,
PluginToolsRequest request)
throws ExtractionException
- Parameters:
scriptFilesKeyedByBasedir - not nulloutputDirectory - not null
- Throws:
ExtractionException - if any
gatherFilesByBasedir
protected java.util.Map gatherFilesByBasedir(java.io.File basedir,
java.util.List directories,
java.lang.String scriptFileExtension,
PluginToolsRequest request)
- Parameters:
basedir - not nulldirectories - not nullscriptFileExtension - not null
- Returns:
- map with subdirs paths as key
extractMojoDescriptorsFromMetadata
protected java.util.List extractMojoDescriptorsFromMetadata(java.util.Map metadataFilesKeyedByBasedir,
PluginToolsRequest request)
throws ExtractionException,
org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException
- Should be implemented in the sub classes.
- Parameters:
metadataFilesKeyedByBasedir - could be nullrequest - The plugin request, never null.
- Returns:
- always null
- Throws:
ExtractionException - if any
org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException - if any
getMetadataFileExtension
protected java.lang.String getMetadataFileExtension(PluginToolsRequest request)
- Should be implemented in the sub classes.
- Returns:
- always null
extractMojoDescriptors
protected java.util.List extractMojoDescriptors(java.util.Map scriptFilesKeyedByBasedir,
PluginToolsRequest request)
throws ExtractionException,
org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException
- Should be implemented in the sub classes.
- Parameters:
scriptFilesKeyedByBasedir - could be nullrequest - The plugin request, never null.
- Returns:
- always null
- Throws:
ExtractionException - if any
org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException - if any
getScriptFileExtension
protected abstract java.lang.String getScriptFileExtension(PluginToolsRequest request)
- Returns:
- the file extension like
.bsh for BeanShell.
Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.