org.apache.maven.plugin.war.packaging
Interface WarPackagingContext


public interface WarPackagingContext

The packaging context.

Author:
Stephane Nicoll

Method Summary
 boolean archiveClasses()
          Specify whether the classes resources should be archived in the WEB-INF/lib of the generated web app.
 org.apache.maven.archiver.MavenArchiveConfiguration getArchive()
          The maven archive configuration to use.
 org.codehaus.plexus.archiver.manager.ArchiverManager getArchiverManager()
          Returns the archiver manager to use.
 java.io.File getClassesDirectory()
          Returns the directory holding generated classes.
 java.util.Map getFilterProperties()
          Returns the filter properties to use to filter resources.
 java.util.List getFilters()
          Returns the list of filter files to use.
 org.codehaus.plexus.archiver.jar.JarArchiver getJarArchiver()
          Returns the Jar archiver needed for archiving classes directory into jar file under WEB-INF/lib.
 org.apache.maven.plugin.logging.Log getLog()
          Returns the logger to use to output logging event.
 java.lang.String getOutputFileNameMapping()
          Returns the output file name mapping to use, if any.
 java.io.File getOverlaysWorkDirectory()
          Returns the directory to unpack dependent WARs into if needed.
 java.util.List getOwnerIds()
          Returns the list of registered overlays for this session.
 org.apache.maven.project.MavenProject getProject()
          Returns the maven project.
 java.io.File getWebappDirectory()
          Returns the webapp directory.
 java.io.File getWebappSourceDirectory()
          Returns the main webapp source directory.
 java.lang.String[] getWebappSourceExcludes()
          Returns the webapp source excludes.
 java.lang.String[] getWebappSourceIncludes()
          Returns the webapp source includes.
 WebappStructure getWebappStructure()
          Returns the WebappStructure.
 

Method Detail

getProject

org.apache.maven.project.MavenProject getProject()
Returns the maven project.

Returns:
the project

getWebappDirectory

java.io.File getWebappDirectory()
Returns the webapp directory. Packaging tasks should use this directory to generate the webapp.

Returns:
the webapp directory

getWebappSourceDirectory

java.io.File getWebappSourceDirectory()
Returns the main webapp source directory.

Returns:
the webapp source directory

getWebappSourceIncludes

java.lang.String[] getWebappSourceIncludes()
Returns the webapp source includes.

Returns:
the webapp source includes

getWebappSourceExcludes

java.lang.String[] getWebappSourceExcludes()
Returns the webapp source excludes.

Returns:
the webapp source excludes

getClassesDirectory

java.io.File getClassesDirectory()
Returns the directory holding generated classes.

Returns:
the classes directory

archiveClasses

boolean archiveClasses()
Specify whether the classes resources should be archived in the WEB-INF/lib of the generated web app.

Returns:
true if the classes should be archived, false otherwise

getLog

org.apache.maven.plugin.logging.Log getLog()
Returns the logger to use to output logging event.

Returns:
the logger

getOverlaysWorkDirectory

java.io.File getOverlaysWorkDirectory()
Returns the directory to unpack dependent WARs into if needed.

Returns:
the overlays work directory

getArchiverManager

org.codehaus.plexus.archiver.manager.ArchiverManager getArchiverManager()
Returns the archiver manager to use.

Returns:
the archiver manager

getArchive

org.apache.maven.archiver.MavenArchiveConfiguration getArchive()
The maven archive configuration to use.

Returns:
the maven archive configuration

getJarArchiver

org.codehaus.plexus.archiver.jar.JarArchiver getJarArchiver()
Returns the Jar archiver needed for archiving classes directory into jar file under WEB-INF/lib.

Returns:
the jar archiver to user

getOutputFileNameMapping

java.lang.String getOutputFileNameMapping()
Returns the output file name mapping to use, if any. Returns null if no file name mapping is set.

Returns:
the output file name mapping or null

getFilters

java.util.List getFilters()
Returns the list of filter files to use.

Returns:
a list of filter files

getFilterProperties

java.util.Map getFilterProperties()
                                  throws org.apache.maven.plugin.MojoExecutionException
Returns the filter properties to use to filter resources.

TODO: this needs to be refactored to use the resource plugin somehow.

Returns:
a map of filter properties
Throws:
org.apache.maven.plugin.MojoExecutionException - if an error occured while reading a filter file

getWebappStructure

WebappStructure getWebappStructure()
Returns the WebappStructure.

Returns:
the webapp structure

getOwnerIds

java.util.List getOwnerIds()
Returns the list of registered overlays for this session. This list might differ from the one returned by the cache; in this case, it means that the project's configuration has changed. The plugin will handle thos cases nicely but it would be better in general to invoke the clean goal.

Returns:
the list of registered overlays, including the current project


Copyright © 2002-2009 Apache Software Foundation. All Rights Reserved.