class JarDelegate extends BaseFileDelegate
Delegate for the jar method's closure. This passes through everything to the JarBuilder.
| Modifiers | Name | Description |
|---|---|---|
static java.lang.String |
ERROR_MESSAGE |
|
org.savantbuild.io.jar.JarBuilder |
builder |
| Fields inherited from class | Fields |
|---|---|
class BaseFileDelegate |
project |
| Constructor and description |
|---|
JarDelegate(org.savantbuild.domain.Project project, java.util.Map<java.lang.String, java.lang.Object> attributes) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
org.savantbuild.io.jar.JarBuilder |
directory(java.util.Map<java.lang.String, java.lang.Object> attributes)Adds a directory to the JAR file: |
|
org.savantbuild.io.jar.JarBuilder |
fileSet(java.util.Map<java.lang.String, java.lang.Object> attributes)Adds a fileSet: |
|
org.savantbuild.io.jar.JarBuilder |
manifest(java.util.Map<java.lang.String, java.lang.Object> attributes)Adds a MANIFEST.MF file to the jar. |
|
org.savantbuild.io.jar.JarBuilder |
optionalFileSet(java.util.Map<java.lang.String, java.lang.Object> attributes)Adds an optionalFileSet: |
| Methods inherited from class | Name |
|---|---|
class BaseFileDelegate |
toArchiveFileSet, toDirectory, toFileSet, toOptionalFileSet |
Adds a directory to the JAR file:
directory(name: "someDir")
attributes - The named attributes (name is required).Adds a fileSet:
fileSet(dir: "someDir")
attributes - The named attributes (dir is required).Adds a MANIFEST.MF file to the jar. This can specify a file for the manifest or it can specify the manifest using a Map of values. Here are some examples:
manifest(file: "src/main/META-INF/MANIFEST.MF")
manifest(map: [
"Implementation-Version": project.version
])
attributes - The named attributes.Adds an optionalFileSet:
optionalFileSet(dir: "someDir")
attributes - The named attributes (dir is required).