org.apache.maven.plugin.war

Class AbstractWarMojo

public abstract class AbstractWarMojo extends AbstractMojo

Field Summary
protected ArchiverManagerarchiverManager
To look up Archiver/UnArchiver implementations
Method Summary
voidbuildExplodedWebapp(File webappDirectory)
voidbuildWebapp(MavenProject project, File webappDirectory)
Builds the webapp for the specified project.
voidcopyResources(Resource resource, File webappDirectory, Properties filterProperties)
Copies webapp webResources from the specified directory.
voidcopyResources(File sourceDirectory, File webappDirectory)
Copies webapp webResources from the specified directory.
FilegetClassesDirectory()
FilegetContainerConfigXML()
protected String[]getDependentWarExcludes()
Returns a string array of the excludes to be used when adding dependent wars as an overlay onto this war.
protected String[]getDependentWarIncludes()
Returns a string array of the includes to be used when adding dependent wars as an overlay onto this war.
protected String[]getExcludes()
Returns a string array of the excludes to be used when assembling/copying the war.
protected String[]getIncludes()
Returns a string array of the includes to be used when assembling/copying the war.
MavenProjectgetProject()
FilegetWarSourceDirectory()
FilegetWebappDirectory()
FilegetWebXml()
voidsetClassesDirectory(File classesDirectory)
voidsetContainerConfigXML(File containerConfigXML)
voidsetProject(MavenProject project)
voidsetWarSourceDirectory(File warSourceDirectory)
voidsetWebappDirectory(File webappDirectory)
voidsetWebXml(File webXml)

Field Detail

archiverManager

protected ArchiverManager archiverManager
To look up Archiver/UnArchiver implementations

UNKNOWN: expression="${component.org.codehaus.plexus.archiver.manager.ArchiverManager}"

Method Detail

buildExplodedWebapp

public void buildExplodedWebapp(File webappDirectory)

buildWebapp

public void buildWebapp(MavenProject project, File webappDirectory)
Builds the webapp for the specified project.

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

Parameters: project the maven project webappDirectory

Throws: java.io.IOException if an error occured while building the webapp

copyResources

public void copyResources(Resource resource, File webappDirectory, Properties filterProperties)
Copies webapp webResources from the specified directory.

Note that the webXml parameter could be null and may specify a file which is not named web.xml. If the file exists, it will be copied to the META-INF directory and renamed accordingly.

Parameters: resource the resource to copy webappDirectory the target directory filterProperties

Throws: java.io.IOException if an error occured while copying webResources

copyResources

public void copyResources(File sourceDirectory, File webappDirectory)
Copies webapp webResources from the specified directory.

Note that the webXml parameter could be null and may specify a file which is not named web.xml. If the file exists, it will be copied to the META-INF directory and renamed accordingly.

Parameters: sourceDirectory the source directory webappDirectory the target directory

Throws: java.io.IOException if an error occured while copying webResources

getClassesDirectory

public File getClassesDirectory()

getContainerConfigXML

public File getContainerConfigXML()

getDependentWarExcludes

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

Returns: an array of tokens to exclude

getDependentWarIncludes

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

Returns: an array of tokens to include

getExcludes

protected String[] getExcludes()
Returns a string array of the excludes to be used when assembling/copying the war.

Returns: an array of tokens to exclude

getIncludes

protected String[] getIncludes()
Returns a string array of the includes to be used when assembling/copying the war.

Returns: an array of tokens to include

getProject

public MavenProject getProject()

getWarSourceDirectory

public File getWarSourceDirectory()

getWebappDirectory

public File getWebappDirectory()

getWebXml

public File getWebXml()

setClassesDirectory

public void setClassesDirectory(File classesDirectory)

setContainerConfigXML

public void setContainerConfigXML(File containerConfigXML)

setProject

public void setProject(MavenProject project)

setWarSourceDirectory

public void setWarSourceDirectory(File warSourceDirectory)

setWebappDirectory

public void setWebappDirectory(File webappDirectory)

setWebXml

public void setWebXml(File webXml)
Copyright © 2002-2007 Apache Software Foundation. All Rights Reserved.