You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

manifest.html 4.4 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>Manifest Task</title>
  5. </head>
  6. <body>
  7. <h2><a name="manifest">Manifest</a></h2>
  8. <h3>Description</h3>
  9. <p>Creates a manifest file.</p>
  10. <p>This task can be used to write a Manifest file, optionally
  11. replacing or updating an existing file.</p>
  12. <p>Manifests are processed according to the
  13. <a href="http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html">Jar
  14. file specification.</a>. Specifically, a manifest element consists of
  15. a set of attributes and sections. These sections in turn may contain
  16. attributes. Note in particular that this may result in manifest lines
  17. greater than 72 bytes being wrapped and continued on the next
  18. line.</p>
  19. <h3>Parameters</h3>
  20. <table border="1" cellpadding="2" cellspacing="0">
  21. <tr>
  22. <td valign="top"><b>Attribute</b></td>
  23. <td valign="top"><b>Description</b></td>
  24. <td align="center" valign="top"><b>Required</b></td>
  25. </tr>
  26. <tr>
  27. <td valign="top">file</td>
  28. <td valign="top">the manifest-file to create/update.</td>
  29. <td valign="top" align="center">Yes</td>
  30. </tr>
  31. <tr>
  32. <td valign="top">mode</td>
  33. <td valign="top">One of "update" or "replace", default is "replace".</td>
  34. <td valign="top" align="center">No</td>
  35. </tr>
  36. </table>
  37. <h3>Nested elements</h3>
  38. <h4><a name="attribute">attribute</h4></h4>
  39. <p>One attribute for the manifest file. Those attributes that are
  40. not nested into a section will be added to the "Main" section.</p>
  41. <table border="1" cellpadding="2" cellspacing="0">
  42. <tr>
  43. <td valign="top"><b>Attribute</b></td>
  44. <td valign="top"><b>Description</b></td>
  45. <td align="center" valign="top"><b>Required</b></td>
  46. </tr>
  47. <tr>
  48. <td valign="top">name</td>
  49. <td valign="top">the name of the attribute.</td>
  50. <td valign="top" align="center">Yes</td>
  51. </tr>
  52. <tr>
  53. <td valign="top">value</td>
  54. <td valign="top">the name of the attribute.</td>
  55. <td valign="top" align="center">Yes</td>
  56. </tr>
  57. </table>
  58. <h4>section</h4>
  59. <p>A manifest section - you can nest <a
  60. href="#attribute">attribute</a> elements into sections.</p>
  61. <table border="1" cellpadding="2" cellspacing="0">
  62. <tr>
  63. <td valign="top"><b>Attribute</b></td>
  64. <td valign="top"><b>Description</b></td>
  65. <td align="center" valign="top"><b>Required</b></td>
  66. </tr>
  67. <tr>
  68. <td valign="top">name</td>
  69. <td valign="top">the name of the section.</td>
  70. <td valign="top" align="center">No, if ommitted it will be assumed
  71. to be the main section.</td>
  72. </tr>
  73. </table>
  74. <h3>Examples</h3>
  75. <pre>
  76. &lt;manifest file=&quot;MANIFEST.MF&quot;&gt;
  77. &lt;attribute name=&quot;Built-By&quot; value=&quot;${user.name}&quot;/&gt;
  78. &lt;section name=&quot;common&quot;&gt;
  79. &lt;attribute name=&quot;Specification-Title&quot; value=&quot;Example&quot; /&gt;
  80. &lt;attribute name=&quot;Specification-Version&quot; value=&quot;${version}&quot; /&gt;
  81. &lt;attribute name=&quot;Specification-Vendor&quot; value=&quot;Example Organization&quot; /&gt;
  82. &lt;attribute name=&quot;Implementation-Title&quot; value=&quot;common&quot; /&gt;
  83. &lt;attribute name=&quot;Implementation-Version&quot; value=&quot;${version} ${TODAY}&quot; /&gt;
  84. &lt;attribute name=&quot;Implementation-Vendor&quot; value=&quot;Example Corp.&quot; /&gt;
  85. &lt;/section&gt;
  86. &lt;section name=&quot;common/class1.class&quot;&gt;
  87. &lt;attribute name=&quot;Sealed&quot; value=&quot;false&quot;/&gt;
  88. &lt;/section&gt;
  89. &lt;/manifest&gt;
  90. </pre>
  91. <p>Creates or replaces the file MANIFEST.MF. Note that the Built-By
  92. attribute will take the value of the Ant property ${user.name}. The
  93. same is true for the ${version} and ${TODAY} properties. This example
  94. produces a MANIFEST.MF that contains
  95. <a href="http://java.sun.com/products/jdk/1.2/docs/guide/versioning/index.html">package
  96. version identification</a> for the package <code>common</code>.</p>
  97. <p>The manifest produced by the above would look like this:</p>
  98. <pre><code>Manifest-Version: 1.0
  99. Built-By: bodewig
  100. Created-By: Apache Ant 1.5alpha
  101. Name: common
  102. Specification-Title: Example
  103. Specification-Vendor: Example Organization
  104. Implementation-Vendor: Example Corp.
  105. Specification-Version: 1.1
  106. Implementation-Version: 1.1 February 19 2002
  107. Implementation-Title: common
  108. Name: common/class1.class
  109. Sealed: false
  110. </code></pre>
  111. <hr>
  112. <p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
  113. Reserved.</p>
  114. </body>
  115. </html>