org.alfresco.maven.plugin.amp
Class AbstractAmpMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.alfresco.maven.plugin.amp.AbstractAmpMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
AmpExplodedMojo, AmpMojo

public abstract class AbstractAmpMojo
extends org.apache.maven.plugin.AbstractMojo


Field Summary
protected  org.apache.maven.archiver.MavenArchiveConfiguration archive
          The maven archive configuration to use.
static String DEFAULT_FILE_NAME_MAPPING
           
static String DEFAULT_FILE_NAME_MAPPING_CLASSIFIER
           
protected  org.codehaus.plexus.archiver.manager.ArchiverManager mArchiverManager
          To look up Archiver/UnArchiver implementations
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractAmpMojo()
           
 
Method Summary
 void addOverlay(Overlay overlay)
           
 void buildAmp(org.apache.maven.project.MavenProject project, File webappDirectory)
          Builds the webapp for the specified project with the new packaging task thingy

Classes, libraries and tld files are copied to the webappDirectory during this phase.

 void buildExplodedAmp(File webappDirectory)
           
 File getAmpDirectory()
           
 String getAmpJarExcludes()
           
 org.apache.maven.model.Resource[] getAmpResources()
           
 File getAmpSourceDirectory()
           
 File getCacheFile()
           
 File getClassesDirectory()
           
protected  String[] getDependentAmpExcludes()
          Returns a string array of the excludes to be used when adding dependent AMPs as an overlay onto this AMP.
protected  String[] getDependentAmpIncludes()
          Returns a string array of the includes to be used when adding dependent AMP as an overlay onto this AMP.
protected  String[] getExcludes()
          Returns a string array of the classes and resources to be excluded from the jar excludes to be used when assembling/copying the AMP.
 List getFilters()
           
protected  String[] getIncludes()
          Returns a string array of the classes and resources to be included from the jar assembling/copying the war.
 org.codehaus.plexus.archiver.jar.JarArchiver getJarArchiver()
           
 String getOutputFileNameMapping()
           
 List getOverlays()
           
 org.apache.maven.project.MavenProject getProject()
           
protected  String[] getWebExcludes()
          Returns a string array of the resources to be excluded in the AMP web/ folder.
protected  String[] getWebIncludes()
          Returns a string array of the resources to be included in the AMP web/ folder.
 File getWebXml()
           
 File getWorkDirectory()
           
 boolean isUseCache()
           
 void setAmpDirectory(File webappDirectory)
           
 void setAmpJarExcludes(String ampJarExcludes)
           
 void setAmpResources(org.apache.maven.model.Resource[] webResources)
           
 void setAmpSourceDirectory(File ampSourceDirectory)
           
 void setAmpSourceIncludes(String ampSourceIncludes)
           
 void setCacheFile(File cacheFile)
           
 void setClassesDirectory(File classesDirectory)
           
 void setFilters(List filters)
           
 void setJarArchiver(org.codehaus.plexus.archiver.jar.JarArchiver jarArchiver)
           
 void setOutputFileNameMapping(String outputFileNameMapping)
           
 void setOverlays(List overlays)
           
 void setProject(org.apache.maven.project.MavenProject project)
           
 void setUseCache(boolean useCache)
           
 void setWebXml(File webXml)
           
 void setWorkDirectory(File workDirectory)
           
 
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
 
Methods inherited from interface org.apache.maven.plugin.Mojo
execute
 

Field Detail

mArchiverManager

protected org.codehaus.plexus.archiver.manager.ArchiverManager mArchiverManager
To look up Archiver/UnArchiver implementations


DEFAULT_FILE_NAME_MAPPING_CLASSIFIER

public static final String DEFAULT_FILE_NAME_MAPPING_CLASSIFIER
See Also:
Constant Field Values

DEFAULT_FILE_NAME_MAPPING

public static final String DEFAULT_FILE_NAME_MAPPING
See Also:
Constant Field Values

archive

protected org.apache.maven.archiver.MavenArchiveConfiguration archive
The maven archive configuration to use.

Constructor Detail

AbstractAmpMojo

public AbstractAmpMojo()
Method Detail

getExcludes

protected String[] getExcludes()
Returns a string array of the classes and resources to be excluded from the jar excludes to be used when assembling/copying the AMP.

Returns:
an array of tokens to exclude

getIncludes

protected String[] getIncludes()
Returns a string array of the classes and resources to be included from the jar assembling/copying the war.

Returns:
an array of tokens to include

getWebIncludes

protected String[] getWebIncludes()
Returns a string array of the resources to be included in the AMP web/ folder.

Returns:
an array of tokens to include

getWebExcludes

protected String[] getWebExcludes()
Returns a string array of the resources to be excluded in the AMP web/ folder.

Returns:
an array of tokens to exclude

getDependentAmpExcludes

protected String[] getDependentAmpExcludes()
Returns a string array of the excludes to be used when adding dependent AMPs as an overlay onto this AMP.

Returns:
an array of tokens to exclude

getDependentAmpIncludes

protected String[] getDependentAmpIncludes()
Returns a string array of the includes to be used when adding dependent AMP as an overlay onto this AMP.

Returns:
an array of tokens to include

buildExplodedAmp

public void buildExplodedAmp(File webappDirectory)
                      throws org.apache.maven.plugin.MojoExecutionException,
                             org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

buildAmp

public void buildAmp(org.apache.maven.project.MavenProject project,
                     File webappDirectory)
              throws org.apache.maven.plugin.MojoExecutionException,
                     org.apache.maven.plugin.MojoFailureException,
                     IOException
Builds the webapp for the specified project with the new packaging task thingy

Classes, libraries and tld files are copied to the webappDirectory during this phase.

Parameters:
project - the maven project
webappDirectory - the target directory
Throws:
org.apache.maven.plugin.MojoExecutionException - if an error occured while packaging the webapp
org.apache.maven.plugin.MojoFailureException - if an unexpected error occured while packaging the webapp
IOException - if an error occured while copying the files

getProject

public org.apache.maven.project.MavenProject getProject()

setProject

public void setProject(org.apache.maven.project.MavenProject project)

getClassesDirectory

public File getClassesDirectory()

setClassesDirectory

public void setClassesDirectory(File classesDirectory)

getAmpDirectory

public File getAmpDirectory()

setAmpDirectory

public void setAmpDirectory(File webappDirectory)

getAmpSourceDirectory

public File getAmpSourceDirectory()

setAmpSourceDirectory

public void setAmpSourceDirectory(File ampSourceDirectory)

getWebXml

public File getWebXml()

setWebXml

public void setWebXml(File webXml)

getOutputFileNameMapping

public String getOutputFileNameMapping()

setOutputFileNameMapping

public void setOutputFileNameMapping(String outputFileNameMapping)

getOverlays

public List getOverlays()

setOverlays

public void setOverlays(List overlays)

addOverlay

public void addOverlay(Overlay overlay)

getJarArchiver

public org.codehaus.plexus.archiver.jar.JarArchiver getJarArchiver()

setJarArchiver

public void setJarArchiver(org.codehaus.plexus.archiver.jar.JarArchiver jarArchiver)

getAmpResources

public org.apache.maven.model.Resource[] getAmpResources()

setAmpResources

public void setAmpResources(org.apache.maven.model.Resource[] webResources)

getFilters

public List getFilters()

setFilters

public void setFilters(List filters)

getWorkDirectory

public File getWorkDirectory()

setWorkDirectory

public void setWorkDirectory(File workDirectory)

getCacheFile

public File getCacheFile()

setCacheFile

public void setCacheFile(File cacheFile)

setAmpSourceIncludes

public void setAmpSourceIncludes(String ampSourceIncludes)

getAmpJarExcludes

public String getAmpJarExcludes()

setAmpJarExcludes

public void setAmpJarExcludes(String ampJarExcludes)

isUseCache

public boolean isUseCache()

setUseCache

public void setUseCache(boolean useCache)


Copyright © 2009 Alfresco. All Rights Reserved.