org.jomc.mojo
Class MainResourcesWriteMojo

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

public final class MainResourcesWriteMojo
extends AbstractResourcesWriteMojo

Writes a projects' main resource files.

Version:
$JOMC: MainResourcesWriteMojo.java 3838 2011-10-08 20:15:41Z schulte2005 $
Author:
Christian Schulte
Is defined by the goal name:
write-main-resources
Is bound to the specified phase of the standard build lifecycle:
process-resources
Requires the dependencies in this specified scope:
test
Mojo is thread safe:
true

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
MainResourcesWriteMojo()
          Creates a new MainResourcesWriteMojo instance.
 
Method Summary
protected  void addMavenResource(MavenProject mavenProject, org.apache.maven.model.Resource resource)
          Adds a resource to a MavenProjecŧ.
protected  String getExecutionStrategy()
          Gets the execution strategy of the instance.
protected  String getGoal()
          Gets the goal of the instance.
protected  ClassLoader getResourcesClassLoader()
          Gets the class loader to use for writing resource files.
protected  File getResourcesDirectory()
          Gets the directory to write the resource files to.
protected  String getResourcesModuleName()
          Gets the name of the module to write resource files of.
protected  File getResourcesOutputDirectory()
          Gets the directory to copy resource files to.
 
Methods inherited from class org.jomc.mojo.AbstractResourcesWriteMojo
executeTool
 
Methods inherited from class org.jomc.mojo.AbstractJomcMojo
assertValidParameters, assertValidResources, createClassFileProcessor, createJomcTool, createModelContext, createObject, createResourceFileProcessor, createSourceFileProcessor, execute, getAbsoluteFile, getDirectory, 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

MainResourcesWriteMojo

public MainResourcesWriteMojo()
Creates a new MainResourcesWriteMojo instance.

Method Detail

getResourcesModuleName

protected String getResourcesModuleName()
                                 throws MojoExecutionException
Description copied from class: AbstractResourcesWriteMojo
Gets the name of the module to write resource files of.

Specified by:
getResourcesModuleName in class AbstractResourcesWriteMojo
Returns:
The name of the module to write resource files of.
Throws:
MojoExecutionException - if getting the name fails.

getResourcesClassLoader

protected ClassLoader getResourcesClassLoader()
                                       throws MojoExecutionException
Description copied from class: AbstractResourcesWriteMojo
Gets the class loader to use for writing resource files.

Specified by:
getResourcesClassLoader in class AbstractResourcesWriteMojo
Returns:
The class loader to use for writing resource files.
Throws:
MojoExecutionException - if getting the class loader fails.

getResourcesDirectory

protected File getResourcesDirectory()
                              throws MojoExecutionException
Description copied from class: AbstractResourcesWriteMojo
Gets the directory to write the resource files to.

Specified by:
getResourcesDirectory in class AbstractResourcesWriteMojo
Returns:
The directory to write the resource files to.
Throws:
MojoExecutionException - if getting the directory fails.

getGoal

protected String getGoal()
                  throws MojoExecutionException
Description copied from class: AbstractJomcMojo
Gets the goal of the instance.

Specified by:
getGoal in class AbstractJomcMojo
Returns:
The goal of the instance.
Throws:
MojoExecutionException - if getting the goal of the instance fails.

getExecutionStrategy

protected String getExecutionStrategy()
                               throws MojoExecutionException
Description copied from class: AbstractJomcMojo
Gets the execution strategy of the instance.

Specified by:
getExecutionStrategy in class AbstractJomcMojo
Returns:
The execution strategy of the instance.
Throws:
MojoExecutionException - if getting the execution strategy of the instance fails.

getResourcesOutputDirectory

protected File getResourcesOutputDirectory()
                                    throws MojoExecutionException
Description copied from class: AbstractResourcesWriteMojo
Gets the directory to copy resource files to.

Specified by:
getResourcesOutputDirectory in class AbstractResourcesWriteMojo
Returns:
The directory to copy resource files to.
Throws:
MojoExecutionException - if getting the directory fails.

addMavenResource

protected void addMavenResource(MavenProject mavenProject,
                                org.apache.maven.model.Resource resource)
                         throws MojoExecutionException
Description copied from class: AbstractResourcesWriteMojo
Adds a resource to a MavenProjecŧ.

Specified by:
addMavenResource in class AbstractResourcesWriteMojo
Parameters:
mavenProject - The MavenProject to add a resource to.
resource - The Resource to add.
Throws:
MojoExecutionException - if adding the resource fails.


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.