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:
- MojoDescriptorExtractor, org.codehaus.plexus.logging.LogEnabled
- Direct Known Subclasses:
- AntMojoDescriptorExtractor, BeanshellMojoDescriptorExtractor
public abstract class AbstractScriptedMojoDescriptorExtractor
- extends org.codehaus.plexus.logging.AbstractLogEnabled
- implements MojoDescriptorExtractor
- Version:
- $Id: AbstractScriptedMojoDescriptorExtractor.java 684236 2008-08-09 12:11:34Z vsiveton $
- Author:
- jdcasey
Method Summary |
protected void |
copyScriptsToOutputDirectory(java.util.Map scriptFilesKeyedByBasedir,
java.lang.String outputDirectory)
|
java.util.List |
execute(org.apache.maven.project.MavenProject project,
org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
Execute the mojo extraction. |
protected java.util.List |
extractMojoDescriptors(java.util.Map scriptFilesKeyedByBasedir,
org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
Should be implemented in the sub classes. |
protected java.util.List |
extractMojoDescriptorsFromMetadata(java.util.Map metadataFilesKeyedByBasedir,
org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
Should be implemented in the sub classes. |
protected java.util.Map |
gatherFilesByBasedir(java.io.File basedir,
java.util.List directories,
java.lang.String scriptFileExtension)
|
protected java.lang.String |
getMetadataFileExtension()
Should be implemented in the sub classes. |
protected abstract java.lang.String |
getScriptFileExtension()
|
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
- Parameters:
project
- not null Maven projectpluginDescriptor
- not null plugin descriptor
- Returns:
- a list of mojo descriptors.
- Throws:
ExtractionException
- if any
org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException
- if any
copyScriptsToOutputDirectory
protected void copyScriptsToOutputDirectory(java.util.Map scriptFilesKeyedByBasedir,
java.lang.String outputDirectory)
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)
- 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,
org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
throws ExtractionException,
org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException
- Should be implemented in the sub classes.
- Parameters:
metadataFilesKeyedByBasedir
- could be nullpluginDescriptor
- could be null
- Returns:
- always null
- Throws:
ExtractionException
- if any
org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException
- if any
getMetadataFileExtension
protected java.lang.String getMetadataFileExtension()
- Should be implemented in the sub classes.
- Returns:
- always null
extractMojoDescriptors
protected java.util.List extractMojoDescriptors(java.util.Map scriptFilesKeyedByBasedir,
org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
throws ExtractionException,
org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException
- Should be implemented in the sub classes.
- Parameters:
scriptFilesKeyedByBasedir
- could be nullpluginDescriptor
- could be null
- Returns:
- always null
- Throws:
ExtractionException
- if any
org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException
- if any
getScriptFileExtension
protected abstract java.lang.String getScriptFileExtension()
- Returns:
- the file extension like
.bsh
for BeanShell.
Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.