Manifest. This task can be used to write a
Manifest file, optionally replacing or updating an existing file.
| Modifier and Type | Class and Description |
|---|---|
| public static class | ManifestTask.Mode
Helper class for Manifest's mode attribute. |
| Modifier and Type | Field and Description |
|---|---|
| private String | encoding
The encoding of the manifest file |
| private boolean | flattenClassPaths
whether to flatten Class-Path attributes into a single one. |
| private File | manifestFile
The file to which the manifest should be written when used as a task |
| private boolean | mergeClassPaths
whether to merge Class-Path attributes. |
| private ManifestTask. | mode
The mode with which the manifest file is written |
| private Manifest | nestedManifest
Holds the real data. |
| public static final String | VALID_ATTRIBUTE_CHARS
Specifies the valid characters which can be used in attribute names. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addConfiguredAttribute(Manifest.
the attribute to be added. attributeAdd an attribute to the manifest - it is added to the main section. |
| public void | addConfiguredSection(Manifest.
the manifest section to be added sectionAdd a section to the manifest |
| private void | checkAttribute(Manifest.
The attribute to check attributeChecks the attribute against the Jar-specification. |
| public void | execute()
Overrides org. |
| public void | setEncoding(String
the manifest file encoding. encoding)The encoding to use for reading in an existing manifest file |
| public void | |
| public void | setFlattenAttributes(boolean
boolean b)Whether to flatten multi-valued attributes (i.e. Class-Path) into a single one. |
| public void | |
| public void | setMode(ManifestTask.
the mode value - update or replace. mUpdate policy: either "update" or "replace"; default is "replace". |
| encoding | back to summary |
|---|---|
| private String encoding The encoding of the manifest file | |
| flattenClassPaths | back to summary |
|---|---|
| private boolean flattenClassPaths whether to flatten Class-Path attributes into a single one. | |
| manifestFile | back to summary |
|---|---|
| private File manifestFile The file to which the manifest should be written when used as a task | |
| mergeClassPaths | back to summary |
|---|---|
| private boolean mergeClassPaths whether to merge Class-Path attributes. | |
| mode | back to summary |
|---|---|
| private ManifestTask. The mode with which the manifest file is written | |
| nestedManifest | back to summary |
|---|---|
| private Manifest nestedManifest Holds the real data. | |
| VALID_ATTRIBUTE_CHARS | back to summary |
|---|---|
| public static final String VALID_ATTRIBUTE_CHARS Specifies the valid characters which can be used in attribute names. abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_ | |
| ManifestTask | back to summary |
|---|---|
| public ManifestTask() Default constructor | |
| addConfiguredAttribute | back to summary |
|---|---|
| public void addConfiguredAttribute(Manifest. Add an attribute to the manifest - it is added to the main section.
| |
| addConfiguredSection | back to summary |
|---|---|
| public void addConfiguredSection(Manifest. Add a section to the manifest
| |
| checkAttribute | back to summary |
|---|---|
| private void checkAttribute(Manifest. Checks the attribute against the Jar-specification. Jar-Specification "Name-Value pairs and Sections":
name: alphanum *headerchar
alphanum: {A-Z} | {a-z} | {0-9}
headerchar: alphanum | - | _
So the resulting regexp would be [A-Za-z0-9][A-Za-z0-9-_]*.
Because of JDK 1.2 compliance and the possible absence of a
regexp matcher we can not use regexps here. Instead we have to
check each character.
| |
| execute | back to summary |
|---|---|
| public void execute() throws BuildException Overrides org. Create or update the Manifest when used as a task.
| |
| setEncoding | back to summary |
|---|---|
| public void setEncoding(String encoding) The encoding to use for reading in an existing manifest file
| |
| setFile | back to summary |
|---|---|
| public void setFile(File f) The name of the manifest file to create/update. Required if used as a task.
| |
| setFlattenAttributes | back to summary |
|---|---|
| public void setFlattenAttributes(boolean b) Whether to flatten multi-valued attributes (i.e. Class-Path) into a single one.
| |
| setMergeClassPathAttributes | back to summary |
|---|---|
| public void setMergeClassPathAttributes(boolean b) Whether to merge Class-Path attributes.
| |
| setMode | back to summary |
|---|---|
| public void setMode(ManifestTask. Update policy: either "update" or "replace"; default is "replace".
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String[] | Returns: a String array of the allowed values.Implements abstract org. |
| Mode | back to summary |
|---|---|
| public Mode() | |
| getValues | back to summary |
|---|---|
| public String[] getValues() Implements abstract org. Get Allowed values for the mode attribute. | |