org.codehaus.mojo.appfuse.mojo
Class CopyMojoBase
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.appfuse.mojo.MojoBase
org.codehaus.mojo.appfuse.mojo.CopyMojoBase
- All Implemented Interfaces:
- org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
- CopyDaoHibernateFilesMojo, CopyModelFilesMojo, CopyXMLFilesMojo
public abstract class CopyMojoBase
- extends MojoBase
This class is a base class for all appfuse plugin copy mojos.
- Version:
- $Id$
- Author:
- Scott Ryan
Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
Method Summary |
protected java.lang.String |
augmentFilePattern(java.lang.String inFilePattern)
This method takes the ant based file pattern and adds the proper suffix onto it for the type of processing the
mojo needs to do. |
protected org.apache.tools.ant.taskdefs.Copy |
createCopyTask(java.lang.String inDestinationDirectory)
This method will create an Ant based copy task based on a processing pattern. |
void |
execute()
This method will copy the files from the generated directory to the final resting place inside the project. |
protected java.lang.String |
getUpdatedFilePattern()
This method will take a bare file pattern and add the proper prefix and suffix to constrain it properly for the
copy operation intended by the mojo. |
Methods inherited from class org.codehaus.mojo.appfuse.mojo.MojoBase |
getBasePackageName, getCopyOverWrite, getFilePattern, getModelDirectory, getModelPackageName, getMojoName, getOutputDirectory, getProcessingProperties, getSourceDirectory, setBasePackageName, setCopyOverWrite, setFilePattern, setModelDirectory, setMojoName, setOutputDirectory, setProcessingProperties, setSourceDirectory, toString |
Methods inherited from class org.apache.maven.plugin.AbstractMojo |
getLog, getPluginContext, setLog, setPluginContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CopyMojoBase
public CopyMojoBase()
execute
public void execute()
throws org.apache.maven.plugin.MojoExecutionException
- This method will copy the files from the generated directory to the final resting place inside the project.
- Specified by:
execute
in interface org.apache.maven.plugin.Mojo
- Overrides:
execute
in class MojoBase
- Throws:
org.apache.maven.plugin.MojoExecutionException
- Thrown if we fail to obtain an appfuse resource.
augmentFilePattern
protected java.lang.String augmentFilePattern(java.lang.String inFilePattern)
- This method takes the ant based file pattern and adds the proper suffix onto it for the type of processing the
mojo needs to do. The default is to add .java to the end however if you need a different suffix or need to
manipulate the pattern in some way you can overload this method.
- Parameters:
inFilePattern
- The initial file pattern requested for processing.
- Returns:
- An augmented file pattern with the type .java added to it.
createCopyTask
protected org.apache.tools.ant.taskdefs.Copy createCopyTask(java.lang.String inDestinationDirectory)
- This method will create an Ant based copy task based on a processing pattern.
- Parameters:
inFilePattern
- The initial pattern to process which should not include any suffix.
- Returns:
- The Ant copy task to copy the proper files
getUpdatedFilePattern
protected java.lang.String getUpdatedFilePattern()
- This method will take a bare file pattern and add the proper prefix and suffix to constrain it properly for the
copy operation intended by the mojo. If the file pattern is blank and default will be chosen to include all files
of that type.
- Returns:
- A updated file pattern to constrain the copy operation.
Copyright © 2006-2009. All Rights Reserved.