war:exploded

Full name:

org.apache.maven.plugins:maven-war-plugin:2.6:exploded

Description:

Create an exploded webapp in a specified directory.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: runtime.
  • The goal is thread-safe and supports parallel builds.
  • Binds by default to the lifecycle phase: package.

Required Parameters

Name Type Since Description
cacheFile File 2.1-alpha-1 The file containing the webapp structure cache.
Default value is: ${project.build.directory}/war/work/webapp-cache.xml.
warSourceDirectory File - Single directory for extra files to include in the WAR. This is where you place your JSP files.
Default value is: ${basedir}/src/main/webapp.
webappDirectory File - The directory where the webapp is built.
Default value is: ${project.build.directory}/${project.build.finalName}.
workDirectory File - Directory to unpack dependent WARs into if needed.
Default value is: ${project.build.directory}/war/work.

Optional Parameters

Name Type Since Description
archive MavenArchiveConfiguration - The archive configuration to use. See Maven Archiver Reference.
archiveClasses boolean 2.0.1 Whether a JAR file will be created for the classes in the webapp. Using this optional configuration parameter will make the compiled classes to be archived into a JAR file and the classes directory will then be excluded from the webapp.
Default value is: false.
User property is: archiveClasses.
containerConfigXML File - The path to a configuration file for the servlet container. Note that the file name may be different for different servlet containers. Apache Tomcat uses a configuration file named context.xml. The file will be copied to the META-INF directory.
User property is: maven.war.containerConfigXML.
dependentWarExcludes String - Deprecated. Use <overlay>/<excludes> instead
dependentWarIncludes String - Deprecated. Use <overlay>/<includes> instead
escapeString String 2.1-beta-1 Expression preceded with this String won't be interpolated. \${foo} will be replaced with ${foo}.
User property is: maven.war.escapeString.
escapedBackslashesInFilePath boolean 2.1-alpha-2 To escape interpolated values with Windows path c:\foo\bar will be replaced with c:\\foo\\bar.
Default value is: false.
User property is: maven.war.escapedBackslashesInFilePath.
filteringDeploymentDescriptors boolean 2.1-alpha-2 To filter deployment descriptors. Disabled by default.
Default value is: false.
User property is: maven.war.filteringDeploymentDescriptors.
filters List - Filters (property files) to include during the interpolation of the pom.xml.
includeEmptyDirectories boolean 2.4 (no description)
Default value is: false.
nonFilteredFileExtensions List 2.1-alpha-2 A list of file extensions that should not be filtered. Will be used when filtering webResources and overlays.
outputFileNameMapping String 2.1-alpha-1 The file name mapping to use when copying libraries and TLDs. If no file mapping is set (default) the files are copied with their standard names.
overlays List 2.1-alpha-1 The overlays to apply. Each <overlay> element may contain:
  • id (defaults to currentBuild)
  • groupId (if this and artifactId are null, then the current project is treated as its own overlay)
  • artifactId (see above)
  • classifier
  • type
  • includes (a list of string patterns)
  • excludes (a list of string patterns)
  • filtered (defaults to false)
  • skip (defaults to false)
  • targetPath (defaults to root of webapp structure)

recompressZippedFiles boolean 2.3 Indicates if zip archives (jar,zip etc) being added to the war should be compressed again. Compressing again can result in smaller archive size, but gives noticeably longer execution time.
Default value is: true.
resourceEncoding String 2.3 The encoding to use when copying filtered web resources.
Default value is: ${project.build.sourceEncoding}.
User property is: resourceEncoding.
supportMultiLineFiltering boolean 2.4 Stop searching endToken at the end of line
Default value is: false.
User property is: maven.war.supportMultiLineFiltering.
useCache boolean 2.1-alpha-1 Whether the cache should be used to save the status of the webapp across multiple runs. Experimental feature so disabled by default.
Default value is: false.
User property is: useCache.
useJvmChmod boolean 2.4 use jvmChmod rather that cli chmod and forking process
Default value is: true.
User property is: maven.war.useJvmChmod.
warSourceExcludes String - The comma separated list of tokens to exclude when copying the content of the warSourceDirectory.
warSourceIncludes String - The comma separated list of tokens to include when copying the content of the warSourceDirectory.
Default value is: **.
webResources Resource[] - The list of webResources we want to transfer.
webXml File - The path to the web.xml file to use.
User property is: maven.war.webxml.

Parameter Details

archive:

The archive configuration to use. See Maven Archiver Reference.
  • Type: org.apache.maven.archiver.MavenArchiveConfiguration
  • Required: No

archiveClasses:

Whether a JAR file will be created for the classes in the webapp. Using this optional configuration parameter will make the compiled classes to be archived into a JAR file and the classes directory will then be excluded from the webapp.
  • Type: boolean
  • Since: 2.0.1
  • Required: No
  • User Property: archiveClasses
  • Default: false

cacheFile:

The file containing the webapp structure cache.
  • Type: java.io.File
  • Since: 2.1-alpha-1
  • Required: Yes
  • Default: ${project.build.directory}/war/work/webapp-cache.xml

containerConfigXML:

The path to a configuration file for the servlet container. Note that the file name may be different for different servlet containers. Apache Tomcat uses a configuration file named context.xml. The file will be copied to the META-INF directory.
  • Type: java.io.File
  • Required: No
  • User Property: maven.war.containerConfigXML

dependentWarExcludes:

Deprecated. Use <overlay>/<excludes> instead
The comma separated list of tokens to exclude when doing a WAR overlay.
  • Type: java.lang.String
  • Required: No

dependentWarIncludes:

Deprecated. Use <overlay>/<includes> instead
The comma separated list of tokens to include when doing a WAR overlay. Default is '**'
  • Type: java.lang.String
  • Required: No

escapeString:

Expression preceded with this String won't be interpolated. \${foo} will be replaced with ${foo}.
  • Type: java.lang.String
  • Since: 2.1-beta-1
  • Required: No
  • User Property: maven.war.escapeString

escapedBackslashesInFilePath:

To escape interpolated values with Windows path c:\foo\bar will be replaced with c:\\foo\\bar.
  • Type: boolean
  • Since: 2.1-alpha-2
  • Required: No
  • User Property: maven.war.escapedBackslashesInFilePath
  • Default: false

filteringDeploymentDescriptors:

To filter deployment descriptors. Disabled by default.
  • Type: boolean
  • Since: 2.1-alpha-2
  • Required: No
  • User Property: maven.war.filteringDeploymentDescriptors
  • Default: false

filters:

Filters (property files) to include during the interpolation of the pom.xml.
  • Type: java.util.List
  • Required: No

includeEmptyDirectories:

(no description)
  • Type: boolean
  • Since: 2.4
  • Required: No
  • Default: false

nonFilteredFileExtensions:

A list of file extensions that should not be filtered. Will be used when filtering webResources and overlays.
  • Type: java.util.List
  • Since: 2.1-alpha-2
  • Required: No

outputFileNameMapping:

The file name mapping to use when copying libraries and TLDs. If no file mapping is set (default) the files are copied with their standard names.
  • Type: java.lang.String
  • Since: 2.1-alpha-1
  • Required: No

overlays:

The overlays to apply. Each <overlay> element may contain:
  • id (defaults to currentBuild)
  • groupId (if this and artifactId are null, then the current project is treated as its own overlay)
  • artifactId (see above)
  • classifier
  • type
  • includes (a list of string patterns)
  • excludes (a list of string patterns)
  • filtered (defaults to false)
  • skip (defaults to false)
  • targetPath (defaults to root of webapp structure)
  • Type: java.util.List
  • Since: 2.1-alpha-1
  • Required: No

recompressZippedFiles:

Indicates if zip archives (jar,zip etc) being added to the war should be compressed again. Compressing again can result in smaller archive size, but gives noticeably longer execution time.
  • Type: boolean
  • Since: 2.3
  • Required: No
  • Default: true

resourceEncoding:

The encoding to use when copying filtered web resources.
  • Type: java.lang.String
  • Since: 2.3
  • Required: No
  • User Property: resourceEncoding
  • Default: ${project.build.sourceEncoding}

supportMultiLineFiltering:

Stop searching endToken at the end of line
  • Type: boolean
  • Since: 2.4
  • Required: No
  • User Property: maven.war.supportMultiLineFiltering
  • Default: false

useCache:

Whether the cache should be used to save the status of the webapp across multiple runs. Experimental feature so disabled by default.
  • Type: boolean
  • Since: 2.1-alpha-1
  • Required: No
  • User Property: useCache
  • Default: false

useJvmChmod:

use jvmChmod rather that cli chmod and forking process
  • Type: boolean
  • Since: 2.4
  • Required: No
  • User Property: maven.war.useJvmChmod
  • Default: true

warSourceDirectory:

Single directory for extra files to include in the WAR. This is where you place your JSP files.
  • Type: java.io.File
  • Required: Yes
  • Default: ${basedir}/src/main/webapp

warSourceExcludes:

The comma separated list of tokens to exclude when copying the content of the warSourceDirectory.
  • Type: java.lang.String
  • Required: No

warSourceIncludes:

The comma separated list of tokens to include when copying the content of the warSourceDirectory.
  • Type: java.lang.String
  • Required: No
  • Default: **

webResources:

The list of webResources we want to transfer.
  • Type: org.apache.maven.model.Resource[]
  • Required: No

webXml:

The path to the web.xml file to use.
  • Type: java.io.File
  • Required: No
  • User Property: maven.war.webxml

webappDirectory:

The directory where the webapp is built.
  • Type: java.io.File
  • Required: Yes
  • Default: ${project.build.directory}/${project.build.finalName}

workDirectory:

Directory to unpack dependent WARs into if needed.
  • Type: java.io.File
  • Required: Yes
  • Default: ${project.build.directory}/war/work