public class BootWar extends org.gradle.api.tasks.bundling.War implements BootArchive
War task that produces a Spring Boot executable war.| Constructor and Description |
|---|
BootWar()
Creates a new
BootWar task. |
| Modifier and Type | Method and Description |
|---|---|
void |
copy() |
protected org.gradle.api.internal.file.copy.CopyAction |
createCopyAction() |
LaunchScriptConfiguration |
getLaunchScript()
Returns the
LaunchScriptConfiguration that will control the script that is
prepended to the archive. |
LayeredSpec |
getLayered()
Returns the spec that describes the layers in a layered jar.
|
org.gradle.api.provider.Property<java.lang.String> |
getMainClass()
Returns the fully-qualified name of the application's main class.
|
java.lang.String |
getMainClassName()
Deprecated.
|
org.gradle.api.file.FileCollection |
getProvidedClasspath()
Returns the provided classpath, the contents of which will be included in the
WEB-INF/lib-provided directory of the war. |
protected boolean |
isLibrary(org.gradle.api.file.FileCopyDetails details)
Return if the
FileCopyDetails are for a library. |
void |
launchScript()
Configures the archive to have a prepended launch script.
|
void |
launchScript(org.gradle.api.Action<LaunchScriptConfiguration> action)
Configures the archive to have a prepended launch script, customizing its
configuration using the given
action. |
void |
layered(org.gradle.api.Action<LayeredSpec> action)
Configures the war's layering using the given
action. |
void |
providedClasspath(java.lang.Object... classpath)
Adds files to the provided classpath to include in the
WEB-INF/lib-provided
directory of the war. |
void |
requiresUnpack(org.gradle.api.specs.Spec<org.gradle.api.file.FileTreeElement> spec)
Adds a spec that identifies files that must be unpacked from the archive when it is
launched.
|
void |
requiresUnpack(java.lang.String... patterns)
Adds Ant-style patterns that identify files that must be unpacked from the archive
when it is launched.
|
protected ZipCompression |
resolveZipCompression(org.gradle.api.file.FileCopyDetails details)
Return the
ZipCompression that should be used when adding the file
represented by the given details to the jar. |
void |
setMainClassName(java.lang.String mainClassName)
Deprecated.
|
void |
setProvidedClasspath(org.gradle.api.file.FileCollection classpath)
Sets the provided classpath to include in the
WEB-INF/lib-provided
directory of the war. |
void |
setProvidedClasspath(java.lang.Object classpath)
Sets the provided classpath to include in the
WEB-INF/lib-provided
directory of the war. |
classpath, getClasspath, getWebInf, getWebXml, setClasspath, setClasspath, setWebXml, webInf, webInfgetManifest, getManifestContentCharset, getMetadataCharset, getMetaInf, manifest, metaInf, metaInf, setManifest, setManifestContentCharset, setMetadataCharsetgetCompressor, getEntryCompression, isZip64, setEntryCompression, setZip64createCopyActionExecuter, getAppendix, getArchiveAppendix, getArchiveBaseName, getArchiveClassifier, getArchiveExtension, getArchiveFile, getArchiveFileName, getArchiveName, getArchivePath, getArchiveVersion, getBaseName, getClassifier, getDestinationDir, getDestinationDirectory, getExtension, getVersion, into, into, into, isPreserveFileTimestamps, isReproducibleFileOrder, setAppendix, setArchiveName, setBaseName, setClassifier, setDestinationDir, setExtension, setPreserveFileTimestamps, setReproducibleFileOrder, setVersioncreateRootSpec, eachFile, eachFile, exclude, exclude, exclude, exclude, expand, filesMatching, filesMatching, filesNotMatching, filesNotMatching, filter, filter, filter, filter, from, from, from, getDirectoryFileTreeFactory, getDirMode, getDuplicatesStrategy, getExcludes, getFileLookup, getFileMode, getFileResolver, getFileSystem, getFilteringCharset, getIncludeEmptyDirs, getIncludes, getInstantiator, getMainSpec, getRootSpec, getSource, include, include, include, include, isCaseSensitive, rename, rename, rename, rename, setCaseSensitive, setDirMode, setDuplicatesStrategy, setExcludes, setFileMode, setFilteringCharset, setIncludeEmptyDirs, setIncludes, withconventionMapping, conventionMapping, getConventionMappingcompareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServiceappendParallelSafeAction, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getOnlyIf, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, prependParallelSafeAction, setImpliesSubProjects, setLoggerMessageRewriterclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclasspath, getClasspath, setClasspath, setClasspathconfigure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServicepublic void copy()
copy in class org.gradle.api.tasks.AbstractCopyTaskprotected org.gradle.api.internal.file.copy.CopyAction createCopyAction()
createCopyAction in class org.gradle.api.tasks.bundling.Zippublic org.gradle.api.provider.Property<java.lang.String> getMainClass()
BootArchivegetMainClass in interface BootArchive@Deprecated public java.lang.String getMainClassName()
BootArchivegetMainClassName in interface BootArchive@Deprecated public void setMainClassName(java.lang.String mainClassName)
BootArchivesetMainClassName in interface BootArchivemainClassName - the fully-qualified name of the application's main classpublic void requiresUnpack(java.lang.String... patterns)
BootArchiverequiresUnpack in interface BootArchivepatterns - the patternspublic void requiresUnpack(org.gradle.api.specs.Spec<org.gradle.api.file.FileTreeElement> spec)
BootArchiverequiresUnpack in interface BootArchivespec - the specpublic LaunchScriptConfiguration getLaunchScript()
BootArchiveLaunchScriptConfiguration that will control the script that is
prepended to the archive.getLaunchScript in interface BootArchivenull if the launch script has
not been configured.public void launchScript()
BootArchivelaunchScript in interface BootArchivepublic void launchScript(org.gradle.api.Action<LaunchScriptConfiguration> action)
BootArchiveaction.launchScript in interface BootArchiveaction - the action to apply@Optional @Classpath public org.gradle.api.file.FileCollection getProvidedClasspath()
WEB-INF/lib-provided directory of the war.public void providedClasspath(java.lang.Object... classpath)
WEB-INF/lib-provided
directory of the war. The given classpath is evaluated as per
Project.files(Object...).classpath - the additions to the classpathpublic void setProvidedClasspath(org.gradle.api.file.FileCollection classpath)
WEB-INF/lib-provided
directory of the war.classpath - the classpathpublic void setProvidedClasspath(java.lang.Object classpath)
WEB-INF/lib-provided
directory of the war. The given classpath is evaluated as per
Project.files(Object...).classpath - the classpathprotected ZipCompression resolveZipCompression(org.gradle.api.file.FileCopyDetails details)
ZipCompression that should be used when adding the file
represented by the given details to the jar. By default, any
library is stored
and all other files are deflated.details - the file copy detailspublic LayeredSpec getLayered()
public void layered(org.gradle.api.Action<LayeredSpec> action)
action.action - the action to applyprotected boolean isLibrary(org.gradle.api.file.FileCopyDetails details)
FileCopyDetails are for a library. By default any file in
WEB-INF/lib or WEB-INF/lib-provided is considered to be a library.details - the file copy detailstrue if the details are for a library