From 1eb5ef27e17a00fccbbb580362b75cfad4af10bd Mon Sep 17 00:00:00 2001
From: Stefan Bodewig MANIFEST.MF
, the file is
ignored and you will get a warning.
The manifest nested element allows the manifest for the Jar file to +be provided inline in the build file rather than in an external +file. This element is identical to the +manifest task, but its file and mode +attributes will be ignored.
-The manifest nested element allows the manifest for the Jar file to be -provided inline in the build file rather than in an external file. This -makes it easy to produce Jar manifests which take values from Ant properties. If both an inline manifest and an external file are both specified, the manifests are merged.
--The manifest element supports nested elements to reflect the structure of -manifests, 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. -
When using inline manifests, the Jar task will check whether the build file is more recent that the Jar file when deciding whether to rebuild the @@ -159,51 +153,6 @@ Jar. This will not take into account property file changes which may affect the resulting Jar.
-The manifest element itself does not support any attributes. It serves -merely as a container for the attribute and section elements that make up the -manifest. The attributes of those elements are as follows: -
--Section -
--
Attribute | -Description | -Required | -
Name | -The name of the section | -Yes | -
-Attribute -
--
Attribute | -Description | -Required | -
Name | -The name of the attribute | -Yes | -
Value | -The value of the attribute | -Yes | -
<jar file="${dist}/lib/app.jar" basedir="${build}/classes"/>
jars all files in the ${build}/classes
directory into a file
diff --git a/docs/manual/CoreTasks/manifest.html b/docs/manual/CoreTasks/manifest.html
index 997ddadfb..92ae24867 100644
--- a/docs/manual/CoreTasks/manifest.html
+++ b/docs/manual/CoreTasks/manifest.html
@@ -14,6 +14,14 @@
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.
+mode | -One of "update" or "replace", default is "update". | +One of "update" or "replace", default is "replace". | No |
+ <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