Class Ear

All Implemented Interfaces:
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>

@DisableCachingByDefault(because="Not worth caching") public abstract class Ear extends Jar
Assembles an EAR archive.
  • Field Details

  • Constructor Details

    • Ear

      public Ear()
  • Method Details

    • getObjectFactory

      @Inject protected ObjectFactory getObjectFactory()
      Overrides:
      getObjectFactory in class AbstractCopyTask
    • deploymentDescriptor

      public Ear deploymentDescriptor(@DelegatesTo(value=DeploymentDescriptor.class,strategy=1) Closure configureClosure)
      Configures the deployment descriptor for this EAR archive.

      The given closure is executed to configure the deployment descriptor. The DeploymentDescriptor is passed to the closure as its delegate.

      Parameters:
      configureClosure - The closure.
      Returns:
      This.
    • deploymentDescriptor

      public Ear deploymentDescriptor(Action<? super DeploymentDescriptor> configureAction)
      Configures the deployment descriptor for this EAR archive.

      The given action is executed to configure the deployment descriptor.

      Parameters:
      configureAction - The action.
      Returns:
      This.
      Since:
      3.5
    • getLib

      @Internal public CopySpec getLib()
      A location for dependency libraries to include in the 'lib' directory of the EAR archive.
    • lib

      public CopySpec lib(@DelegatesTo(value=CopySpec.class,strategy=1) Closure configureClosure)
      Adds dependency libraries to include in the 'lib' directory of the EAR archive.

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

      Parameters:
      configureClosure - The closure.
      Returns:
      The created CopySpec
    • lib

      public CopySpec lib(Action<? super CopySpec> configureAction)
      Adds dependency libraries to include in the 'lib' directory of the EAR archive.

      The given action is executed to configure a CopySpec.

      Parameters:
      configureAction - The action.
      Returns:
      The created CopySpec
      Since:
      3.5
    • getLibDirName

      @Nullable @Optional @Input public String getLibDirName()
      The name of the library directory in the EAR file. Default is "lib".
    • setLibDirName

      public void setLibDirName(@Nullable String libDirName)
    • getGenerateDeploymentDescriptor

      @Input public Property<Boolean> getGenerateDeploymentDescriptor()
      Should deploymentDescriptor be generated?
      Since:
      6.0
    • getDeploymentDescriptor

      @Internal public DeploymentDescriptor getDeploymentDescriptor()
      The deployment descriptor configuration.
    • setDeploymentDescriptor

      public void setDeploymentDescriptor(DeploymentDescriptor deploymentDescriptor)
    • getAppDirectory

      @Internal public DirectoryProperty getAppDirectory()
      The application directory. Added to the produced archive by default.

      The ear plugin sets the default value for all Ear tasks to src/main/application.

      Note, that if the ear plugin is not applied then this property is ignored.

      Since:
      7.1