public class WarProjectPackagingTask extends AbstractWarPackagingTask
Modifier and Type | Field and Description |
---|---|
private java.io.File |
containerConfigXML |
private Overlay |
currentProjectOverlay |
private java.lang.String |
id |
private org.apache.maven.model.Resource[] |
webResources |
private java.io.File |
webXml |
CLASSES_PATH, DEFAULT_INCLUDES, LIB_PATH, META_INF_PATH, WEB_INF_PATH
Constructor and Description |
---|
WarProjectPackagingTask(org.apache.maven.model.Resource[] webResources,
java.io.File webXml,
java.io.File containerConfigXml,
Overlay currentProjectOverlay) |
Modifier and Type | Method and Description |
---|---|
void |
copyResources(WarPackagingContext context,
org.apache.maven.model.Resource resource)
Copies webapp webResources from the specified directory.
|
private java.lang.String[] |
getFilesToCopy(org.apache.maven.model.Resource resource)
Returns a list of filenames that should be copied over to the destination directory.
|
protected void |
handeWebAppSourceDirectory(WarPackagingContext context)
Handles the webapp sources.
|
protected void |
handleArtifacts(WarPackagingContext context)
Handles the webapp artifacts.
|
protected void |
handleClassesDirectory(WarPackagingContext context)
Handles the webapp classes.
|
protected void |
handleDeploymentDescriptors(WarPackagingContext context,
java.io.File webinfDir,
java.io.File metainfDir)
Handles the deployment descriptors, if specified.
|
protected void |
handleWebResources(WarPackagingContext context)
Handles the web resources.
|
void |
performPackaging(WarPackagingContext context)
Performs the packaging for the specified task.
|
copyFile, copyFile, copyFiles, copyFiles, copyFilteredFile, doUnpack, getArtifactFinalName, getEncoding, getFilesToIncludes, getFilesToIncludes
private final org.apache.maven.model.Resource[] webResources
private final java.io.File webXml
private final java.io.File containerConfigXML
private final java.lang.String id
private Overlay currentProjectOverlay
public WarProjectPackagingTask(org.apache.maven.model.Resource[] webResources, java.io.File webXml, java.io.File containerConfigXml, Overlay currentProjectOverlay)
webResources
- webResources
webXml
- webXml
containerConfigXml
- containerConfigXML
currentProjectOverlay
- currentProjectOverlay
public void performPackaging(WarPackagingContext context) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
context
- the packaging contextorg.apache.maven.plugin.MojoExecutionException
- if an error occurredorg.apache.maven.plugin.MojoFailureException
- if the project configuration is invalidprotected void handleWebResources(WarPackagingContext context) throws org.apache.maven.plugin.MojoExecutionException
context
- the packaging contextorg.apache.maven.plugin.MojoExecutionException
- if a resource could not be copiedprotected void handeWebAppSourceDirectory(WarPackagingContext context) throws org.apache.maven.plugin.MojoExecutionException
context
- the packaging contextorg.apache.maven.plugin.MojoExecutionException
- if the sources could not be copiedprotected void handleArtifacts(WarPackagingContext context) throws org.apache.maven.plugin.MojoExecutionException
context
- the packaging contextorg.apache.maven.plugin.MojoExecutionException
- if the artifacts could not be packagedprotected void handleClassesDirectory(WarPackagingContext context) throws org.apache.maven.plugin.MojoExecutionException
context
- the packaging contextorg.apache.maven.plugin.MojoExecutionException
- if the classes could not be packagedprotected void handleDeploymentDescriptors(WarPackagingContext context, java.io.File webinfDir, java.io.File metainfDir) throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
context
- the packaging contextwebinfDir
- the web-inf directorymetainfDir
- the meta-inf directoryorg.apache.maven.plugin.MojoFailureException
- if the web.xml is specified but does not existorg.apache.maven.plugin.MojoExecutionException
- if an error occurred while copying the descriptorspublic void copyResources(WarPackagingContext context, org.apache.maven.model.Resource resource) throws java.io.IOException, org.apache.maven.plugin.MojoExecutionException
context
- the WAR packaging context to useresource
- the resource to copyjava.io.IOException
- if an error occurred while copying the resourcesorg.apache.maven.plugin.MojoExecutionException
- if an error occurred while retrieving the filter propertiesprivate java.lang.String[] getFilesToCopy(org.apache.maven.model.Resource resource)
resource
- the resource to be scanned