org.jomc.mojo
Class AbstractResourcesWriteMojo

Package class diagram package AbstractResourcesWriteMojo
java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.jomc.mojo.AbstractJomcMojo
          extended by org.jomc.mojo.AbstractResourcesWriteMojo
All Implemented Interfaces:
ContextEnabled, Mojo
Direct Known Subclasses:
MainResourcesWriteMojo, TestResourcesWriteMojo

public abstract class AbstractResourcesWriteMojo
extends AbstractJomcMojo

Base class for writing resource files.

Version:
$JOMC: AbstractResourcesWriteMojo.java 4442 2012-03-15 06:13:13Z schulte2005 $
Author:
Christian Schulte

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractResourcesWriteMojo()
          Creates a new AbstractResourcesWriteMojo instance.
 
Method Summary
protected abstract  void addMavenResource(MavenProject mavenProject, org.apache.maven.model.Resource resource)
          Adds a resource to a MavenProjecŧ.
protected  void executeTool()
          Executes this tool.
protected abstract  ClassLoader getResourcesClassLoader()
          Gets the class loader to use for writing resource files.
protected abstract  File getResourcesDirectory()
          Gets the directory to write the resource files to.
protected abstract  String getResourcesModuleName()
          Gets the name of the module to write resource files of.
protected abstract  File getResourcesOutputDirectory()
          Gets the directory to copy resource files to.
 
Methods inherited from class org.jomc.mojo.AbstractJomcMojo
assertValidParameters, assertValidResources, createClassFileProcessor, createJomcTool, createModelContext, createObject, createResourceFileProcessor, createSourceFileProcessor, execute, getAbsoluteFile, getDirectory, getExecutionStrategy, getGoal, getMainClassLoader, getMainClasspathElements, getMavenProject, getMavenSession, getModel, getModel, getModuleName, getOutputDirectory, getProperties, getReportOutputDirectory, getResource, getSessionDirectory, getSourceDirectory, getTestClassLoader, getTestClasspathElements, getTestModuleName, getTestOutputDirectory, getTestSourceDirectory, getTransformer, isClassProcessingEnabled, isExecutionPermitted, isLoggable, isModelObjectClasspathResolutionEnabled, isModelProcessingEnabled, isResourceProcessingEnabled, isSourceProcessingEnabled, isVerbose, log, log, logMissingModule, logProcessingModel, logProcessingModule, logSeparator, logSeparator, logToolSuccess, setClassProcessingEnabled, setModelObjectClasspathResolutionEnabled, setModelProcessingEnabled, setResourceProcessingEnabled, setSourceProcessingEnabled, setupJomcTool, setupModelContext, setVerbose
 
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, toString, wait, wait, wait
 

Constructor Detail

AbstractResourcesWriteMojo

public AbstractResourcesWriteMojo()
Creates a new AbstractResourcesWriteMojo instance.

Method Detail

executeTool

protected final void executeTool()
                          throws Exception
Description copied from class: AbstractJomcMojo
Executes this tool.

Specified by:
executeTool in class AbstractJomcMojo
Throws:
Exception - if execution of this tool fails.

getResourcesModuleName

protected abstract String getResourcesModuleName()
                                          throws MojoExecutionException
Gets the name of the module to write resource files of.

Returns:
The name of the module to write resource files of.
Throws:
MojoExecutionException - if getting the name fails.

getResourcesClassLoader

protected abstract ClassLoader getResourcesClassLoader()
                                                throws MojoExecutionException
Gets the class loader to use for writing resource files.

Returns:
The class loader to use for writing resource files.
Throws:
MojoExecutionException - if getting the class loader fails.

getResourcesDirectory

protected abstract File getResourcesDirectory()
                                       throws MojoExecutionException
Gets the directory to write the resource files to.

Returns:
The directory to write the resource files to.
Throws:
MojoExecutionException - if getting the directory fails.

getResourcesOutputDirectory

protected abstract File getResourcesOutputDirectory()
                                             throws MojoExecutionException
Gets the directory to copy resource files to.

Returns:
The directory to copy resource files to.
Throws:
MojoExecutionException - if getting the directory fails.
Since:
1.2

addMavenResource

protected abstract void addMavenResource(MavenProject mavenProject,
                                         org.apache.maven.model.Resource resource)
                                  throws MojoExecutionException
Adds a resource to a MavenProjecŧ.

Parameters:
mavenProject - The MavenProject to add a resource to.
resource - The Resource to add.
Throws:
MojoExecutionException - if adding the resource fails.
Since:
1.2


Copyright © 2005-2012 The JOMC Project. All Rights Reserved.Get JOMC at SourceForge.net. Fast, secure and Free Open Source software downloads
Please note that this documentation is maintained by non-native english speaking authors. As such, you may encounter phrases or wordings which seem imprecise or may even have a totally different meaning to native english speaking readers than what the individual author was trying to express. If you are a native english speaking reader and find any such phrases or wordings we kindly ask you to send an email to the corresponding author and help us improve this documentation in order to avoid misunderstandings. You will find the authors' email addresses at the top of each class. Please accept our apologies for any inconvenience caused.