public abstract class AbstractWarMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
protected String |
escapeString
Expression preceded with this String won't be interpolated.
|
protected Boolean |
failOnMissingWebXml
Whether or not to fail the build if the
web.xml file is missing. |
protected String |
outputTimestamp
Timestamp for reproducible output archive entries, either formatted as ISO 8601
yyyy-MM-dd'T'HH:mm:ssXXX or as an int representing seconds since the epoch (like
SOURCE_DATE_EPOCH). |
protected String |
propertiesEncoding
The character encoding to use when reading and writing filtered properties files.
|
| Constructor and Description |
|---|
AbstractWarMojo() |
| Modifier and Type | Method and Description |
|---|---|
void |
addOverlay(Overlay overlay) |
void |
buildExplodedWebapp(File webapplicationDirectory) |
void |
buildWebapp(org.apache.maven.project.MavenProject mavenProject,
File webapplicationDirectory)
Builds the webapp for the specified project with the new packaging task thingy.
|
org.apache.maven.archiver.MavenArchiveConfiguration |
getArchive() |
org.apache.maven.artifact.factory.ArtifactFactory |
getArtifactFactory() |
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.
|
org.codehaus.plexus.archiver.jar.JarArchiver |
getJarArchiver() |
List<String> |
getNonFilteredFileExtensions() |
String |
getOutputFileNameMapping() |
List<Overlay> |
getOverlays() |
org.apache.maven.project.MavenProject |
getProject() |
protected org.apache.maven.execution.MavenSession |
getSession() |
File |
getWarSourceDirectory() |
String |
getWarSourceExcludes() |
String |
getWarSourceIncludes() |
File |
getWebappDirectory() |
org.apache.maven.model.Resource[] |
getWebResources() |
File |
getWebXml() |
File |
getWorkDirectory() |
boolean |
isArchiveClasses() |
protected boolean |
isIncludeEmptyDirectories() |
protected boolean |
isRecompressZippedFiles() |
void |
setArchiveClasses(boolean archiveClasses) |
void |
setArtifactFactory(org.apache.maven.artifact.factory.ArtifactFactory artifactFactory) |
void |
setClassesDirectory(File classesDirectory) |
void |
setContainerConfigXML(File containerConfigXML) |
void |
setFilters(List<String> filters) |
void |
setJarArchiver(org.codehaus.plexus.archiver.jar.JarArchiver jarArchiver) |
void |
setNonFilteredFileExtensions(List<String> nonFilteredFileExtensions) |
void |
setOutputFileNameMapping(String outputFileNameMapping) |
void |
setOverlays(List<Overlay> overlays) |
void |
setProject(org.apache.maven.project.MavenProject project) |
void |
setWarSourceDirectory(File warSourceDirectory) |
void |
setWarSourceExcludes(String warSourceExcludes) |
void |
setWarSourceIncludes(String warSourceIncludes) |
void |
setWebappDirectory(File webappDirectory) |
void |
setWebResources(org.apache.maven.model.Resource[] webResources) |
void |
setWebXml(File webXml) |
void |
setWorkDirectory(File workDirectory) |
getLog, getPluginContext, setLog, setPluginContext@Parameter protected Boolean failOnMissingWebXml
web.xml file is missing. Set to false if you
want your WAR built without a web.xml file. This may be useful if you are building an overlay that
has no web.xml file.
Starting with 3.1.0, this property defaults to false if the project depends on the Servlet
3.0 API or newer.
@Parameter protected String propertiesEncoding
@Parameter protected String escapeString
\${foo} will be replaced with
${foo}.@Parameter(defaultValue="${project.build.outputTimestamp}")
protected String outputTimestamp
yyyy-MM-dd'T'HH:mm:ssXXX or as an int representing seconds since the epoch (like
SOURCE_DATE_EPOCH).public Overlay getCurrentProjectOverlay()
protected String[] getExcludes()
protected String[] getIncludes()
protected String[] getDependentWarExcludes()
protected String[] getDependentWarIncludes()
public void buildExplodedWebapp(File webapplicationDirectory) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
webapplicationDirectory - The web application directory.org.apache.maven.plugin.MojoExecutionException - In case of failure.org.apache.maven.plugin.MojoFailureException - In case of failure.public void buildWebapp(org.apache.maven.project.MavenProject mavenProject,
File webapplicationDirectory)
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException,
IOException
webappDirectory during this phase.mavenProject - the maven projectwebapplicationDirectory - the target directoryorg.apache.maven.plugin.MojoExecutionException - if an error occurred while packaging the webapporg.apache.maven.plugin.MojoFailureException - if an unexpected error occurred while packaging the webappIOException - if an error occurred while copying the filespublic org.apache.maven.project.MavenProject getProject()
public void setProject(org.apache.maven.project.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()
webappDirectorypublic void setWebappDirectory(File webappDirectory)
webappDirectory - The web application directory.public File getWarSourceDirectory()
warSourceDirectorypublic void setWarSourceDirectory(File warSourceDirectory)
warSourceDirectory - warSourceDirectorypublic File getContainerConfigXML()
containerConfigXMLpublic void setContainerConfigXML(File containerConfigXML)
containerConfigXML - containerConfigXMLpublic String getOutputFileNameMapping()
outputFileNameMappingpublic void setOutputFileNameMapping(String outputFileNameMapping)
outputFileNameMapping - outputFileNameMappingpublic boolean isArchiveClasses()
archiveClassespublic void setArchiveClasses(boolean archiveClasses)
archiveClasses - archiveClassespublic org.codehaus.plexus.archiver.jar.JarArchiver getJarArchiver()
JarArchiverpublic void setJarArchiver(org.codehaus.plexus.archiver.jar.JarArchiver jarArchiver)
jarArchiver - JarArchiverpublic org.apache.maven.model.Resource[] getWebResources()
webResources.public void setWebResources(org.apache.maven.model.Resource[] webResources)
webResources - webResources.public File getWorkDirectory()
workDirectorypublic void setWorkDirectory(File workDirectory)
workDirectory - workDirectorypublic String getWarSourceIncludes()
warSourceIncludespublic void setWarSourceIncludes(String warSourceIncludes)
warSourceIncludes - warSourceIncludespublic String getWarSourceExcludes()
warSourceExcludespublic void setWarSourceExcludes(String warSourceExcludes)
warSourceExcludes - warSourceExcludespublic org.apache.maven.archiver.MavenArchiveConfiguration getArchive()
archivepublic List<String> getNonFilteredFileExtensions()
nonFilteredFileExtensionspublic void setNonFilteredFileExtensions(List<String> nonFilteredFileExtensions)
nonFilteredFileExtensions - nonFilteredFileExtensionspublic org.apache.maven.artifact.factory.ArtifactFactory getArtifactFactory()
artifactFactorypublic void setArtifactFactory(org.apache.maven.artifact.factory.ArtifactFactory artifactFactory)
artifactFactory - artifactFactoryprotected org.apache.maven.execution.MavenSession getSession()
sessionprotected boolean isRecompressZippedFiles()
recompressZippedFilesprotected boolean isIncludeEmptyDirectories()
includeEmptyDirectoriesCopyright © 2002–2023 The Apache Software Foundation. All rights reserved.