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.

antjar.html 2.9 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>Ant User Manual</title>
  5. </head>
  6. <body>
  7. <h2><a name="antjar">AntJar</a></h2>
  8. <h3>Description</h3>
  9. <p>An extension of the <a href="jar.html">Jar</a> task with special
  10. treatment for the library descriptor file that should end up in the
  11. <code>META-INF</code> directory of the Ant Archive.</p>
  12. <p>This task validates the provided library descriptor making certain
  13. it specifies the following SYSTEM ID:
  14. <b>&quot;http://jakarta.apache.org/ant/AntlibV1_0.dtd&quot;</b>.
  15. This DTD is defined as follows:</p>
  16. <pre>
  17. &lt;?xml version='1.0' encoding="UTF8" ?&gt;
  18. &lt;!--
  19. This file defines the XML format for ANT library descriptors.
  20. Descriptors must especify a DOCTYPE of
  21. "http://jakarta.apache.org/ant/Antlib-V1_0.dtd"
  22. as the SystemId for the document.
  23. --&gt;
  24. &lt;!-- Root element for the Antlib descriptor. --&gt;
  25. &lt;!ELEMENT antlib (task | type)* &gt;
  26. &lt;!ATTLIST antlib
  27. version CDATA #IMPLIED
  28. &gt;
  29. &lt;!-- Declaration of tasks contained in the library. --&gt;
  30. &lt;!ELEMENT task EMPTY&gt;
  31. &lt;!ATTLIST task
  32. name CDATA #REQUIRED
  33. class CDATA #REQUIRED
  34. &gt;
  35. &lt;!-- Declaration of datatypes contained in the library --&gt;
  36. &lt;!ELEMENT type EMPTY&gt;
  37. &lt;!ATTLIST type
  38. name CDATA #REQUIRED
  39. class CDATA #REQUIRED
  40. &gt;
  41. </pre>
  42. <h3>Parameters</h3>
  43. <table border="1" cellpadding="2" cellspacing="0">
  44. <tr>
  45. <td valign="top"><b>Attribute</b></td>
  46. <td valign="top"><b>Description</b></td>
  47. <td align="center" valign="top"><b>Required</b></td>
  48. </tr>
  49. <tr>
  50. <td valign="top">antxml</td>
  51. <td valign="top">The library descriptor to use (META-INF/antlib.xml).</td>
  52. <td valign="top" align="center">Yes</td>
  53. </tr>
  54. <tr>
  55. <td valign="top"><b>Others...</b></td>
  56. <td valign="top">All attributes inherited form the
  57. <a href="jar.html">Jar task</a>.</td>
  58. <td valign="top" align="center"> </td>
  59. </tr>
  60. </table>
  61. <h3>Nested elements</h3>
  62. See the nested elements of the <a href="jar.html">Jar task</a>.
  63. <h3>Examples</h3>
  64. <pre> &lt;antjar file=&quot;${dist}/lib/app.jar&quot;
  65. antxml=&quot;${src}/applib.xml&quot; basedir=&quot;${build}/classes&quot;/&gt;</pre>
  66. <p>jars all files in the <code>${build}/classes</code> directory into a file
  67. called <code>app.jar</code> in the <code>${dist}/lib</code> directory and
  68. sets the content of <code>${src}/applib.xml</code> as the library descriptor
  69. in <code>META-INF/antlib.xml</code>.</p>
  70. <p>Here is a sample <code>META-INF/antlib.xml</code>:</p>
  71. <pre>
  72. &lt;?xml version="1.0" encoding="UTF8" ?&gt;
  73. &lt;!DOCTYPE antlib SYSTEM "http://jakarta.apache.org/ant/Antlib-V1_0.dtd" &gt;
  74. &lt;antlib version="1.0" &gt;
  75. &lt;task name="case" class="org.apache.ant.contrib.Case" /&gt;
  76. &lt;/antlib&gt;
  77. </pre>
  78. <hr>
  79. <p align="center">Copyright &copy; 2000,2001 Apache Software Foundation. All rights
  80. Reserved.</p>
  81. </body>
  82. </html>