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.

ear.html 3.7 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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="ear">Ear</a></h2>
  8. <h3>Description</h3>
  9. <p>An extension of the <a href="jar.html">Jar</a> task with special
  10. treatment for files that should end up in an Enterprise Application archive.</p>
  11. <p>(The Ear task is a shortcut for specifying the particular layout of a EAR file.
  12. The same thing can be accomplished by using the <i>prefix</i> and <i>fullpath</i>
  13. attributes of zipfilesets in a Zip or Jar task.)</p>
  14. <p>The extended zipfileset element from the zip task (with attributes <i>prefix</i>, <i>fullpath</i>, and <i>src</i>) is available in the Ear task.</p>
  15. <h3>Parameters</h3>
  16. <table border="1" cellpadding="2" cellspacing="0">
  17. <tr>
  18. <td valign="top"><b>Attribute</b></td>
  19. <td valign="top"><b>Description</b></td>
  20. <td align="center" valign="top"><b>Required</b></td>
  21. </tr>
  22. <tr>
  23. <td valign="top">earfile</td>
  24. <td valign="top">the ear-file to create.</td>
  25. <td valign="top" align="center">Yes</td>
  26. </tr>
  27. <tr>
  28. <td valign="top">appxml</td>
  29. <td valign="top">The deployment descriptor to use (META-INF/application.xml).</td>
  30. <td valign="top" align="center">Yes</td>
  31. </tr>
  32. <tr>
  33. <td valign="top">basedir</td>
  34. <td valign="top">the directory from which to jar the files.</td>
  35. <td valign="top" align="center">No</td>
  36. </tr>
  37. <tr>
  38. <td valign="top">compress</td>
  39. <td valign="top">Not only store data but also compress them, defaults to true</td>
  40. <td align="center" valign="top">No</td>
  41. </tr>
  42. <tr>
  43. <td valign="top">includes</td>
  44. <td valign="top">comma separated list of patterns of files that must be
  45. included. All files are included when omitted.</td>
  46. <td valign="top" align="center">No</td>
  47. </tr>
  48. <tr>
  49. <td valign="top">includesfile</td>
  50. <td valign="top">the name of a file. Each line of this file is
  51. taken to be an include pattern</td>
  52. <td valign="top" align="center">No</td>
  53. </tr>
  54. <tr>
  55. <td valign="top">excludes</td>
  56. <td valign="top">comma separated list of patterns of files that must be
  57. excluded. No files (except default excludes) are excluded when omitted.</td>
  58. <td valign="top" align="center">No</td>
  59. </tr>
  60. <tr>
  61. <td valign="top">excludesfile</td>
  62. <td valign="top">the name of a file. Each line of this file is
  63. taken to be an exclude pattern</td>
  64. <td valign="top" align="center">No</td>
  65. </tr>
  66. <tr>
  67. <td valign="top">defaultexcludes</td>
  68. <td valign="top">indicates whether default excludes should be used or not
  69. (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when omitted.</td>
  70. <td valign="top" align="center">No</td>
  71. </tr>
  72. <tr>
  73. <td valign="top">manifest</td>
  74. <td valign="top">the manifest file to use.</td>
  75. <td valign="top" align="center">No</td>
  76. </tr>
  77. <tr>
  78. <td valign="top">whenempty</td>
  79. <td valign="top">Behavior to use if no files match.</td>
  80. <td valign="top" align="center">No</td>
  81. </tr>
  82. </table>
  83. <h3>Nested elements</h3>
  84. <h4>metainf</h4>
  85. <p>The nested <code>metainf</code> element specifies a <a
  86. href="../CoreTypes/fileset.html">FileSet</a>. All files included in this fileset will
  87. end up in the <code>META-INF</code> directory of the ear file. If this
  88. fileset includes a file named <code>MANIFEST.MF</code>, the file is
  89. ignored and you will get a warning.</p>
  90. <h2>Example</h2>
  91. <pre>
  92. &lt;ear earfile="${build.dir}/myapp.ear" appxml="${src.dir}/metadata/application.xml"&gt;
  93. &lt;fileset dir="${build.dir}" includes="*.jar,*.war"/&gt;
  94. &lt;/ear&gt;
  95. </pre>
  96. <hr>
  97. <p align="center">Copyright &copy; 2000,2001 Apache Software Foundation. All rights
  98. Reserved.</p>
  99. </body>
  100. </html>