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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>EAR Task</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">destfile</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, unless update is set to true</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">encoding</td>
  44. <td valign="top">The character encoding to use for filenames
  45. inside the archive. Defaults to UTF8. <strong>It is not
  46. recommended to change this value as the created archive will most
  47. likely be unreadable for Java otherwise.</strong></td>
  48. <td align="center" valign="top">No</td>
  49. </tr>
  50. <tr>
  51. <td valign="top">filesonly</td>
  52. <td valign="top">Store only file entries, defaults to false</td>
  53. <td align="center" valign="top">No</td>
  54. </tr>
  55. <tr>
  56. <td valign="top">includes</td>
  57. <td valign="top">comma separated list of patterns of files that must be
  58. included. All files are included when omitted.</td>
  59. <td valign="top" align="center">No</td>
  60. </tr>
  61. <tr>
  62. <td valign="top">includesfile</td>
  63. <td valign="top">the name of a file. Each line of this file is
  64. taken to be an include pattern</td>
  65. <td valign="top" align="center">No</td>
  66. </tr>
  67. <tr>
  68. <td valign="top">excludes</td>
  69. <td valign="top">comma separated list of patterns of files that must be
  70. excluded. No files (except default excludes) are excluded when omitted.</td>
  71. <td valign="top" align="center">No</td>
  72. </tr>
  73. <tr>
  74. <td valign="top">excludesfile</td>
  75. <td valign="top">the name of a file. Each line of this file is
  76. taken to be an exclude pattern</td>
  77. <td valign="top" align="center">No</td>
  78. </tr>
  79. <tr>
  80. <td valign="top">defaultexcludes</td>
  81. <td valign="top">indicates whether default excludes should be used or not
  82. (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when omitted.</td>
  83. <td valign="top" align="center">No</td>
  84. </tr>
  85. <tr>
  86. <td valign="top">manifest</td>
  87. <td valign="top">the manifest file to use.</td>
  88. <td valign="top" align="center">No</td>
  89. </tr>
  90. <tr>
  91. <td valign="top">update</td>
  92. <td valign="top">indicates whether to update or overwrite
  93. the destination file if it already exists.</td>
  94. <td valign="top" align="center">No</td>
  95. </tr>
  96. </table>
  97. <h3>Nested elements</h3>
  98. <h4>metainf</h4>
  99. <p>The nested <code>metainf</code> element specifies a <a
  100. href="../CoreTypes/fileset.html">FileSet</a>. All files included in this fileset will
  101. end up in the <code>META-INF</code> directory of the ear file. If this
  102. fileset includes a file named <code>MANIFEST.MF</code>, the file is
  103. ignored and you will get a warning.</p>
  104. <h2>Example</h2>
  105. <pre>
  106. &lt;ear destfile=&quot;${build.dir}/myapp.ear&quot; appxml=&quot;${src.dir}/metadata/application.xml&quot;&gt;
  107. &lt;fileset dir=&quot;${build.dir}&quot; includes=&quot;*.jar,*.war&quot;/&gt;
  108. &lt;/ear&gt;
  109. </pre>
  110. <hr>
  111. <p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All rights
  112. Reserved.</p>
  113. </body>
  114. </html>