Package org.apache.tools.ant.taskdefs.optional.extension

## Class JarLibManifestTask

- java.lang.Object
- - org.apache.tools.ant.ProjectComponent
  - - org.apache.tools.ant.Task
    - - org.apache.tools.ant.taskdefs.optional.extension.JarLibManifestTask

- All Implemented Interfaces:
    `java.lang.Cloneable`

      public final class JarLibManifestTask
      extends Task

  Generates a manifest that declares all the dependencies. The dependencies are determined by looking in the specified path and searching for Extension / "Optional Package" specifications in the manifests of the jars.

  Prior to JDK1.3, an "Optional Package" was known as an Extension. The specification for this mechanism is available in the JDK1.3 documentation in the directory $JDK_HOME/docs/guide/extensions/versioning.html. Alternatively it is available online at http://java.sun.com/j2se/1.3/docs/guide/extensions/versioning.html.

- - ### Field Summary

    - ### Fields inherited from class org.apache.tools.ant.Task

      `target, taskName, taskType, wrapper`

    - ### Fields inherited from class org.apache.tools.ant.ProjectComponent

      `description, location, project`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `JarLibManifestTask()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addConfiguredAttribute​(ExtraAttribute attribute)` | Adds an attribute that is to be put in main section of manifest.
    `void` | `addConfiguredDepends​(ExtensionSet extensionSet)` | Adds a set of extensions that this library requires.
    `void` | `addConfiguredExtension​(ExtensionAdapter extensionAdapter)` | Adds an extension that this library implements.
    `void` | `addConfiguredOptions​(ExtensionSet extensionSet)` | Adds a set of extensions that this library optionally requires.
    `void` | `execute()` | Execute the task.
    `void` | `setDestfile​(java.io.File destFile)` | The location where generated manifest is placed.

    - ### Methods inherited from class org.apache.tools.ant.Task

      `bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType`

    - ### Methods inherited from class org.apache.tools.ant.ProjectComponent

      `clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JarLibManifestTask

          public JarLibManifestTask()

  - ### Method Detail

    - #### setDestfile

          public void setDestfile​(java.io.File destFile)

      The location where generated manifest is placed.
      Parameters:
        `destFile` - The location where generated manifest is placed.

    - #### addConfiguredExtension

          public void addConfiguredExtension​(ExtensionAdapter extensionAdapter)
                                      throws BuildException

      Adds an extension that this library implements.
      Parameters:
        `extensionAdapter` - an extension that this library implements.
      Throws:
        `BuildException` - if there is multiple extensions detected in the library.

    - #### addConfiguredDepends

          public void addConfiguredDepends​(ExtensionSet extensionSet)

      Adds a set of extensions that this library requires.
      Parameters:
        `extensionSet` - a set of extensions that this library requires.

    - #### addConfiguredOptions

          public void addConfiguredOptions​(ExtensionSet extensionSet)

      Adds a set of extensions that this library optionally requires.
      Parameters:
        `extensionSet` - a set of extensions that this library optionally requires.

    - #### addConfiguredAttribute

          public void addConfiguredAttribute​(ExtraAttribute attribute)

      Adds an attribute that is to be put in main section of manifest.
      Parameters:
        `attribute` - an attribute that is to be put in main section of manifest.

    - #### execute

          public void execute()
                       throws BuildException

      Execute the task.
      Overrides:
        `execute` in class `Task`
      Throws:
        `BuildException` - if the task fails.