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, ExtensionAware, Task, PatternFilterable, org.gradle.util.Configurable<Task>

public class Ear extends Jar
Assembles an EAR archive.
  • Field Details

  • Constructor Details

    • Ear

      public Ear()
  • Method Details

    • getObjectFactory

      @Incubating @Inject protected ObjectFactory getObjectFactory()
      Injects and returns an instance of ObjectFactory.
      Since:
      4.2
    • 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

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

      public void setLibDirName(String libDirName)
    • getDeploymentDescriptor

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

      public void setDeploymentDescriptor(DeploymentDescriptor deploymentDescriptor)