Assembles a WAR archive.
Modifiers | Name | Description |
---|---|---|
static String |
WAR_EXTENSION |
Fields inherited from class | Fields |
---|---|
class Jar |
DEFAULT_EXTENSION |
class Zip |
ZIP_EXTENSION |
Constructor and description |
---|
War
() |
Type | Name and description |
---|---|
void |
classpath(Object... classpath) Adds files to the classpath to include in the WAR archive. |
FileCollection |
getClasspath() Returns the classpath to include in the WAR archive. |
CopySpec |
getWebInf() |
File |
getWebXml() Returns the web.xml file to include in the WAR archive. |
void |
setClasspath(Object classpath) Sets the classpath to include in the WAR archive. |
void |
setWebXml(File webXml) Sets the web.xml file to include in the WAR archive. |
CopySpec |
webInf(Closure configureClosure) Adds some content to the WEB-INF directory for this WAR archive. |
Adds files to the classpath to include in the WAR archive.
classpath
- The files to add. These are evaluated as per Project.files 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.
Returns the web.xml
file to include in the WAR archive. When null
, no web.xml
file is
included in the WAR.
web.xml
file.Sets the classpath to include in the WAR archive.
classpath
- The classpath. Must not be null. Sets the web.xml
file to include in the WAR archive. When null
, no web.xml
file is
included in the WAR.
webXml
- The web.xml
file. Maybe null. 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.
CopySpec
.configureClosure
- The closure to executeGradle API 2.2-20140924021627+0000