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 3.1 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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/class1.class&quot;&gt;
  79. &lt;attribute name=&quot;Sealed&quot; value=&quot;false&quot;/&gt;
  80. &lt;/section&gt;
  81. &lt;/manifest&gt;
  82. </pre>
  83. <p>Creates or replaces the file MANIFEST.MF. Note that the Built-By
  84. attribute will take the value of the Ant property ${user.name}. The
  85. manifest produced by the above would look like this:
  86. </p>
  87. <pre><code>Manifest-Version: 1.0
  88. Built-By: bodewig
  89. Created-By: Apache Ant 1.5alpha
  90. Name: common/class1.class
  91. Sealed: false</code></pre>
  92. </body>
  93. </html>