org.apache.maven.plugin.war.packaging
Class OverlayPackagingTask

java.lang.Object
  extended by org.apache.maven.plugin.war.packaging.AbstractWarPackagingTask
      extended by org.apache.maven.plugin.war.packaging.OverlayPackagingTask
All Implemented Interfaces:
WarPackagingTask

public class OverlayPackagingTask
extends AbstractWarPackagingTask

Handles an overlay.

Version:
$Id: OverlayPackagingTask.java 985593 2010-08-14 22:12:09Z dennisl $
Author:
Stephane Nicoll

Field Summary
 
Fields inherited from class org.apache.maven.plugin.war.packaging.AbstractWarPackagingTask
CLASSES_PATH, DEFAULT_INCLUDES, LIB_PATH, META_INF_PATH, WEB_INF_PATH
 
Constructor Summary
OverlayPackagingTask(Overlay overlay, Overlay currentProjectOverlay)
           
 
Method Summary
protected  File getOverlayTempDirectory(WarPackagingContext context, Overlay overlay)
          Returns the directory to use to unpack the specified overlay.
 void performPackaging(WarPackagingContext context)
          Performs the packaging for the specified task.
protected  File unpackOverlay(WarPackagingContext context, Overlay overlay)
          Unpacks the specified overlay.
 
Methods inherited from class org.apache.maven.plugin.war.packaging.AbstractWarPackagingTask
copyFile, copyFile, copyFiles, copyFiles, copyFilteredFile, doUnpack, getArtifactFinalName, getFilesToIncludes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OverlayPackagingTask

public OverlayPackagingTask(Overlay overlay,
                            Overlay currentProjectOverlay)
Method Detail

performPackaging

public void performPackaging(WarPackagingContext context)
                      throws MojoExecutionException
Description copied from interface: WarPackagingTask
Performs the packaging for the specified task.

The task is responsible to update the packaging context, namely with the files that have been copied.

Parameters:
context - the packaging context
Throws:
MojoExecutionException - if an error occurred

unpackOverlay

protected File unpackOverlay(WarPackagingContext context,
                             Overlay overlay)
                      throws MojoExecutionException
Unpacks the specified overlay.

Makes sure to skip the unpack process if the overlay has already been unpacked.

Parameters:
context - the packaging context
overlay - the overlay
Returns:
the directory containing the unpacked overlay
Throws:
MojoExecutionException - if an error occurred while unpacking the overlay

getOverlayTempDirectory

protected File getOverlayTempDirectory(WarPackagingContext context,
                                       Overlay overlay)
Returns the directory to use to unpack the specified overlay.

Parameters:
context - the packaging context
overlay - the overlay
Returns:
the temp directory for the overlay


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.