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


public interface WarPackagingContext

The packaging context.

Version:
$Id: WarPackagingContext.html 868453 2013-07-05 11:25:41Z olamy $
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.
 MavenArchiveConfiguration getArchive()
          The maven archive configuration to use.
 ArchiverManager getArchiverManager()
          Returns the archiver manager to use.
 ArtifactFactory getArtifactFactory()
           
 File getClassesDirectory()
          Returns the directory holding generated classes.
 List<String> getFilters()
          Returns the list of filter files to use.
 List<FileUtils.FilterWrapper> getFilterWrappers()
           
 JarArchiver getJarArchiver()
          Returns the Jar archiver needed for archiving classes directory into jar file under WEB-INF/lib.
 Log getLog()
          Returns the logger to use to output logging event.
 MavenFileFilter getMavenFileFilter()
          Returns the MavenFileFilter instance to use.
 String getOutputFileNameMapping()
          Returns the output file name mapping to use, if any.
 File getOverlaysWorkDirectory()
          Returns the directory to unpack dependent WARs into if needed.
 List<String> getOwnerIds()
          Returns the list of registered overlays for this session.
 MavenProject getProject()
          Returns the maven project.
 String getResourceEncoding()
          Returns the encoding to use for resources.
 MavenSession getSession()
          Returns the Maven session.
 File getWebappDirectory()
          Returns the webapp directory.
 File getWebappSourceDirectory()
          Returns the main webapp source directory.
 String[] getWebappSourceExcludes()
          Returns the webapp source excludes.
 String[] getWebappSourceIncludes()
          Returns the webapp source includes.
 WebappStructure getWebappStructure()
          Returns the WebappStructure.
 boolean isFilteringDeploymentDescriptors()
           
 boolean isNonFilteredExtension(String fileName)
          Specify if the given fileName belongs to the list of extensions that must not be filtered
 boolean isUseJvmChmod()
           
 boolean isWebappSourceIncludeEmptyDirectories()
          Returns true if empty directories should be includes, othewrwise false
 

Method Detail

getProject

MavenProject getProject()
Returns the maven project.

Returns:
the project

getWebappDirectory

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

Returns:
the webapp directory

getWebappSourceDirectory

File getWebappSourceDirectory()
Returns the main webapp source directory.

Returns:
the webapp source directory

getWebappSourceIncludes

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

Returns:
the webapp source includes

isWebappSourceIncludeEmptyDirectories

boolean isWebappSourceIncludeEmptyDirectories()
Returns true if empty directories should be includes, othewrwise false

Returns:
true if empty directories should be includes, othewrwise false

getWebappSourceExcludes

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

Returns:
the webapp source excludes

getClassesDirectory

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

Log getLog()
Returns the logger to use to output logging event.

Returns:
the logger

getOverlaysWorkDirectory

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

Returns:
the overlays work directory

getArchiverManager

ArchiverManager getArchiverManager()
Returns the archiver manager to use.

Returns:
the archiver manager

getArchive

MavenArchiveConfiguration getArchive()
The maven archive configuration to use.

Returns:
the maven archive configuration

getJarArchiver

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

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

List<String> getFilters()
Returns the list of filter files to use.

Returns:
a list of filter files

getWebappStructure

WebappStructure getWebappStructure()
Returns the WebappStructure.

Returns:
the webapp structure

getOwnerIds

List<String> 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 those cases nicely but it would be better in general to invoke the clean goal.

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

getMavenFileFilter

MavenFileFilter getMavenFileFilter()
Returns the MavenFileFilter instance to use.

Returns:
the maven file filter to use
Since:
2.1-alpha-2

getFilterWrappers

List<FileUtils.FilterWrapper> getFilterWrappers()
Returns:
List of FileUtils.FilterWrapper
Since:
2.1-alpha-2

isNonFilteredExtension

boolean isNonFilteredExtension(String fileName)
Specify if the given fileName belongs to the list of extensions that must not be filtered

Parameters:
fileName - the name of file
Returns:
true if it should not be filtered, false otherwise
Since:
2.1-alpha-2

isFilteringDeploymentDescriptors

boolean isFilteringDeploymentDescriptors()

getArtifactFactory

ArtifactFactory getArtifactFactory()

getSession

MavenSession getSession()
Returns the Maven session.

Returns:
the Maven session
Since:
2.2

getResourceEncoding

String getResourceEncoding()
Returns the encoding to use for resources.

Returns:
the resource encoding
Since:
2.3

isUseJvmChmod

boolean isUseJvmChmod()
Returns:
to use jvmChmod rather than forking chmod cli
Since:
2.4


Copyright © 2002–2013 The Apache Software Foundation. All rights reserved.