api / org.gradle.api.tasks.bundling / War

War

open class War : Jar

Assembles a WAR archive.

Constructors

<init>

War()

Properties

WAR_EXTENSION

static val WAR_EXTENSION: String

Functions

classpath

open fun classpath(vararg classpath: Any): Unit

Adds files to the classpath to include in the WAR archive.

getClasspath

open fun getClasspath(): FileCollection

Returns the classpath to include in the WAR archive. Any JAR or ZIP files in this classpath are included in the WEB-INF/lib directory. Any directories in this classpath are included in the WEB-INF/classes directory.

getWebInf

open fun getWebInf(): CopySpec

getWebXml

open fun getWebXml(): File

Returns the web.xml file to include in the WAR archive. When null, no web.xml file is included in the WAR.

setClasspath

open fun setClasspath(classpath: FileCollection): Unit
open fun setClasspath(classpath: Any): Unit

Sets the classpath to include in the WAR archive.

setWebXml

open fun setWebXml(webXml: File): Unit

Sets the web.xml file to include in the WAR archive. When null, no web.xml file is included in the WAR.

webInf

open fun webInf(configureClosure: Closure<Any>): CopySpec

Adds some content to the WEB-INF directory for this WAR archive.

The given closure is executed to configure a CopySpec. The CopySpec is passed to the closure as its delegate.

open fun webInf(configureAction: Action<in CopySpec>): CopySpec

Adds some content to the WEB-INF directory for this WAR archive.

The given action is executed to configure a CopySpec.

Inherited Functions

manifest

open fun manifest(configureClosure: Closure<*>): Jar