Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gradle.api.tasks.bundling
[Groovy] Class Jar

    java.lang.Object
      org.gradle.api.internal.ConventionTask
          org.gradle.api.tasks.AbstractCopyTask
              org.gradle.api.tasks.bundling.AbstractArchiveTask
                  org.gradle.api.tasks.bundling.Zip
                      org.gradle.api.tasks.bundling.Jar

    class Jar
    extends Zip

Assembles a JAR archive.

Authors:
  Hans Dockter

Field Summary
`static java.lang.String` | `DEFAULT_EXTENSION`

Fields inherited from class Zip
ZIP_EXTENSION

Constructor Summary
`Jar()`

Method Summary
`Manifest` | `getManifest()` Returns the manifest for this JAR archive.
`CopySpec` | `getMetaInf()`
`Jar` | `manifest(groovy.lang.Closure configureClosure)` Configures the manifest for this JAR archive.
`CopySpec` | `metaInf(groovy.lang.Closure configureClosure)` Adds content to this JAR archive's META-INF directory.
`void` | `setManifest(Manifest manifest)` Sets the manifest for this JAR archive.

Methods inherited from class Zip
getCopyAction

Methods inherited from class AbstractArchiveTask
getAppendix, getArchiveName, getArchivePath, getBaseName, getClassifier, getDestinationDir, getExtension, getVersion, setAppendix, setArchiveName, setBaseName, setClassifier, setDestinationDir, setExtension, setVersion

Methods inherited from class AbstractCopyTask
configureRootSpec, copy, eachFile, eachFile, exclude, exclude, exclude, exclude, expand, filter, filter, filter, from, from, getCopyAction, getDefaultSource, getDirMode, getExcludes, getFileMode, getIncludes, getMainSpec, getRootSpec, getSource, include, include, include, include, into, into, isCaseSensitive, rename, rename, rename, setCaseSensitive, setDirMode, setExcludes, setFileMode, setIncludes, with

Field Detail

### DEFAULT_EXTENSION

    public static final java.lang.String DEFAULT_EXTENSION

Constructor Detail

### Jar

    Jar()

Method Detail

### getManifest

    Manifest getManifest()

  Returns the manifest for this JAR archive.
  Returns:
    The manifest

### getMetaInf

    CopySpec getMetaInf()

### manifest

    Jar manifest(groovy.lang.Closure configureClosure)

  Configures the manifest for this JAR archive.

  The given closure is executed to configure the manifest. The Manifest is passed to the closure as its delegate.

  Parameters:
    `configureClosure` - The closure.
  Returns:
    This.

### metaInf

    CopySpec metaInf(groovy.lang.Closure configureClosure)

  Adds content to this JAR archive's META-INF directory.

  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`

### setManifest

    void setManifest(Manifest manifest)

  Sets the manifest for this JAR archive.
  Parameters:
    `manifest` - The manifest. May be null.

Groovy Documentation