所有已实现的接口:
Comparable<Task>, ContentFilterable, CopyProcessingSpec, CopySourceSpec, CopySpec, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.file.copy.CopySpecSource, org.gradle.api.internal.IConventionAware, org.gradle.api.internal.TaskInternal, Named, ExtensionAware, Task, PatternFilterable, Configurable<Task>, BootArchive

@DisableCachingByDefault(because="Not worth caching") public abstract class BootWar extends War implements BootArchive
A custom War task that produces a Spring Boot executable war.
从以下版本开始:
2.0.0
作者:
Andy Wilkinson, Phillip Webb, Scott Frederick
  • 构造器详细资料

    • BootWar

      public BootWar()
      Creates a new BootWar task.
  • 方法详细资料

    • resolvedArtifacts

      public void resolvedArtifacts(Provider<Set<ResolvedArtifactResult>> resolvedArtifacts)
      从接口复制的说明: BootArchive
      Registers the given lazily provided resolvedArtifacts. They are used to map from the files in the classpath to their dependency coordinates.
      指定者:
      resolvedArtifacts 在接口中 BootArchive
      参数:
      resolvedArtifacts - the lazily provided resolved artifacts
    • copy

      public void copy()
      覆盖:
      copy 在类中 AbstractCopyTask
    • createCopyAction

      protected org.gradle.api.internal.file.copy.CopyAction createCopyAction()
      覆盖:
      createCopyAction 在类中 Zip
    • requiresUnpack

      public void requiresUnpack(String... patterns)
      从接口复制的说明: BootArchive
      Adds Ant-style patterns that identify files that must be unpacked from the archive when it is launched.
      指定者:
      requiresUnpack 在接口中 BootArchive
      参数:
      patterns - the patterns
    • requiresUnpack

      public void requiresUnpack(Spec<FileTreeElement> spec)
      从接口复制的说明: BootArchive
      Adds a spec that identifies files that must be unpacked from the archive when it is launched.
      指定者:
      requiresUnpack 在接口中 BootArchive
      参数:
      spec - the spec
    • getLaunchScript

      public LaunchScriptConfiguration getLaunchScript()
      从接口复制的说明: BootArchive
      Returns the LaunchScriptConfiguration that will control the script that is prepended to the archive.
      指定者:
      getLaunchScript 在接口中 BootArchive
      返回:
      the launch script configuration, or null if the launch script has not been configured.
    • launchScript

      public void launchScript()
      从接口复制的说明: BootArchive
      Configures the archive to have a prepended launch script.
      指定者:
      launchScript 在接口中 BootArchive
    • launchScript

      public void launchScript(Action<LaunchScriptConfiguration> action)
      从接口复制的说明: BootArchive
      Configures the archive to have a prepended launch script, customizing its configuration using the given action.
      指定者:
      launchScript 在接口中 BootArchive
      参数:
      action - the action to apply
    • getProvidedClasspath

      @Optional @Classpath public FileCollection getProvidedClasspath()
      Returns the provided classpath, the contents of which will be included in the WEB-INF/lib-provided directory of the war.
      返回:
      the provided classpath
    • providedClasspath

      public void providedClasspath(Object... classpath)
      Adds files to the provided classpath to include in the WEB-INF/lib-provided directory of the war. The given classpath is evaluated as per Project.files(Object...).
      参数:
      classpath - the additions to the classpath
    • setProvidedClasspath

      public void setProvidedClasspath(FileCollection classpath)
      Sets the provided classpath to include in the WEB-INF/lib-provided directory of the war.
      参数:
      classpath - the classpath
      从以下版本开始:
      2.0.7
    • setProvidedClasspath

      public void setProvidedClasspath(Object classpath)
      Sets the provided classpath to include in the WEB-INF/lib-provided directory of the war. The given classpath is evaluated as per Project.files(Object...).
      参数:
      classpath - the classpath
      从以下版本开始:
      2.0.7
    • resolveZipCompression

      protected ZipCompression resolveZipCompression(FileCopyDetails details)
      Return the 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 details
      返回:
      the compression to use
    • getLayered

      public LayeredSpec getLayered()
      Returns the spec that describes the layers in a layered jar.
      返回:
      the spec for the layers
      从以下版本开始:
      2.5.0
    • layered

      public void layered(Action<LayeredSpec> action)
      Configures the war's layering using the given action.
      参数:
      action - the action to apply
      从以下版本开始:
      2.5.0
    • isLibrary

      protected boolean isLibrary(FileCopyDetails details)
      Return if the 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 details
      返回:
      true if the details are for a library