public abstract class AbstractWarMojo extends AbstractMojo
Modifier and Type | Field and Description |
---|---|
protected String |
escapeString
Expression preceded with this String won't be interpolated.
|
Constructor and Description |
---|
AbstractWarMojo() |
Modifier and Type | Method and Description |
---|---|
void |
addOverlay(Overlay overlay) |
void |
buildExplodedWebapp(File webapplicationDirectory) |
void |
buildWebapp(MavenProject mavenProject,
File webapplicationDirectory)
Builds the webapp for the specified project with the new packaging task thingy
Classes, libraries and tld files are copied to the webappDirectory during this phase.
|
MavenArchiveConfiguration |
getArchive() |
ArtifactFactory |
getArtifactFactory() |
File |
getCacheFile() |
File |
getClassesDirectory() |
File |
getContainerConfigXML() |
Overlay |
getCurrentProjectOverlay() |
protected String[] |
getDependentWarExcludes()
Returns a string array of the excludes to be used when adding dependent WAR 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 copying the content of the WAR source directory.
|
List<String> |
getFilters() |
protected String[] |
getIncludes()
Returns a string array of the includes to be used when assembling/copying the WAR.
|
JarArchiver |
getJarArchiver() |
List<String> |
getNonFilteredFileExtensions() |
String |
getOutputFileNameMapping() |
List<Overlay> |
getOverlays() |
MavenProject |
getProject() |
protected MavenSession |
getSession() |
File |
getWarSourceDirectory() |
String |
getWarSourceExcludes() |
String |
getWarSourceIncludes() |
File |
getWebappDirectory() |
Resource[] |
getWebResources() |
File |
getWebXml() |
File |
getWorkDirectory() |
boolean |
isArchiveClasses() |
protected boolean |
isIncludeEmptyDirectories() |
protected boolean |
isRecompressZippedFiles() |
boolean |
isUseCache() |
void |
setArchiveClasses(boolean archiveClasses) |
void |
setArtifactFactory(ArtifactFactory artifactFactory) |
void |
setCacheFile(File cacheFile) |
void |
setClassesDirectory(File classesDirectory) |
void |
setContainerConfigXML(File containerConfigXML) |
void |
setFilters(List<String> filters) |
void |
setJarArchiver(JarArchiver jarArchiver) |
void |
setNonFilteredFileExtensions(List<String> nonFilteredFileExtensions) |
void |
setOutputFileNameMapping(String outputFileNameMapping) |
void |
setOverlays(List<Overlay> overlays) |
void |
setProject(MavenProject project) |
void |
setUseCache(boolean useCache) |
void |
setWarSourceDirectory(File warSourceDirectory) |
void |
setWarSourceExcludes(String warSourceExcludes) |
void |
setWarSourceIncludes(String warSourceIncludes) |
void |
setWebappDirectory(File webappDirectory) |
void |
setWebResources(Resource[] webResources) |
void |
setWebXml(File webXml) |
void |
setWorkDirectory(File workDirectory) |
getLog, getPluginContext, setLog, setPluginContext
@Parameter(property="maven.war.escapeString") protected String escapeString
\${foo}
will be replaced with
${foo}
.public Overlay getCurrentProjectOverlay()
protected String[] getExcludes()
protected String[] getIncludes()
protected String[] getDependentWarExcludes()
protected String[] getDependentWarIncludes()
public void buildExplodedWebapp(File webapplicationDirectory) throws MojoExecutionException, MojoFailureException
webapplicationDirectory
- The web application directory.MojoExecutionException
- In case of failure.MojoFailureException
- In case of failure.public void buildWebapp(MavenProject mavenProject, File webapplicationDirectory) throws MojoExecutionException, MojoFailureException, IOException
mavenProject
- the maven projectwebapplicationDirectory
- the target directoryMojoExecutionException
- if an error occurred while packaging the webappMojoFailureException
- if an unexpected error occurred while packaging the webappIOException
- if an error occurred while copying the filespublic MavenProject getProject()
public void setProject(MavenProject project)
project
- The project to be set.public File getClassesDirectory()
public void setClassesDirectory(File classesDirectory)
classesDirectory
- The classes directory to be set.public File getWebappDirectory()
webappDirectory
public void setWebappDirectory(File webappDirectory)
webappDirectory
- The web application directory.public File getWarSourceDirectory()
warSourceDirectory
public void setWarSourceDirectory(File warSourceDirectory)
warSourceDirectory
- warSourceDirectory
public File getContainerConfigXML()
containerConfigXML
public void setContainerConfigXML(File containerConfigXML)
containerConfigXML
- containerConfigXML
public String getOutputFileNameMapping()
outputFileNameMapping
public void setOutputFileNameMapping(String outputFileNameMapping)
outputFileNameMapping
- outputFileNameMapping
public boolean isArchiveClasses()
archiveClasses
public void setArchiveClasses(boolean archiveClasses)
archiveClasses
- archiveClasses
public JarArchiver getJarArchiver()
JarArchiver
public void setJarArchiver(JarArchiver jarArchiver)
jarArchiver
- JarArchiver
public Resource[] getWebResources()
webResources
.public void setWebResources(Resource[] webResources)
webResources
- webResources
.public File getWorkDirectory()
workDirectory
public void setWorkDirectory(File workDirectory)
workDirectory
- workDirectory
public String getWarSourceIncludes()
warSourceIncludes
public void setWarSourceIncludes(String warSourceIncludes)
warSourceIncludes
- warSourceIncludes
public String getWarSourceExcludes()
warSourceExcludes
public void setWarSourceExcludes(String warSourceExcludes)
warSourceExcludes
- warSourceExcludes
public boolean isUseCache()
useCache
public void setUseCache(boolean useCache)
useCache
- useCache
public MavenArchiveConfiguration getArchive()
archive
public List<String> getNonFilteredFileExtensions()
nonFilteredFileExtensions
public void setNonFilteredFileExtensions(List<String> nonFilteredFileExtensions)
nonFilteredFileExtensions
- nonFilteredFileExtensions
public ArtifactFactory getArtifactFactory()
artifactFactory
public void setArtifactFactory(ArtifactFactory artifactFactory)
artifactFactory
- artifactFactory
protected MavenSession getSession()
session
protected boolean isRecompressZippedFiles()
recompressZippedFiles
protected boolean isIncludeEmptyDirectories()
includeEmptyDirectories
Copyright © 2002–2015 The Apache Software Foundation. All rights reserved.