Creates a manifest file.
This task can be used to write a Manifest file, optionally replacing or updating an existing file.
Manifests are processed according to the Jar file specification.. Specifically, a manifest element consists of a set of attributes and sections. These sections in turn may contain attributes. Note in particular that this may result in manifest lines greater than 72 bytes being wrapped and continued on the next line.
Attribute | Description | Required |
file | the manifest-file to create/update. | Yes |
mode | One of "update" or "replace", default is "replace". | No |
One attribute for the manifest file. Those attributes that are not nested into a section will be added to the "Main" section.
Attribute | Description | Required |
name | the name of the attribute. | Yes |
value | the name of the attribute. | Yes |
A manifest section - you can nest attribute elements into sections.
Attribute | Description | Required |
name | the name of the section. | No, if ommitted it will be assumed to be the main section. |
<manifest file="MANIFEST.MF"> <attribute name="Built-By" value="${user.name}"/> <section name="common/class1.class"> <attribute name="Sealed" value="false"/> </section> </manifest>
Creates or replaces the file MANIFEST.MF. Note that the Built-By attribute will take the value of the Ant property ${user.name}. The manifest produced by the above would look like this:
Manifest-Version: 1.0
Built-By: bodewig
Created-By: Apache Ant 1.5alpha
Name: common/class1.class
Sealed: false