source: release-kits/lirk3/bin/ant-installer/web/manual1.6.2/manual/CoreTasks/ear.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 5.9 KB
Line 
1<html>
2
3<head>
4<meta http-equiv="Content-Language" content="en-us">
5<title>EAR Task</title>
6<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
7</head>
8
9<body>
10
11<h2><a name="ear">Ear</a></h2>
12<h3>Description</h3>
13<p>An extension of the <a href="jar.html">Jar</a> task with special
14treatment for files that should end up in an Enterprise Application archive.</p>
15<p>(The Ear task is a shortcut for specifying the particular layout of a EAR file.
16The same thing can be accomplished by using the <i>prefix</i> and <i>fullpath</i>
17attributes of zipfilesets in a Zip or Jar task.)</p>
18<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>
19
20<h3>Parameters</h3>
21<table border="1" cellpadding="2" cellspacing="0">
22 <tr>
23 <td valign="top"><b>Attribute</b></td>
24 <td valign="top"><b>Description</b></td>
25 <td align="center" valign="top"><b>Required</b></td>
26 </tr>
27 <tr>
28 <td valign="top">destfile</td>
29 <td valign="top">the EAR file to create.</td>
30 <td valign="top" align="center">Yes</td>
31 </tr>
32 <tr>
33 <td valign="top">appxml</td>
34 <td valign="top">The deployment descriptor to use (META-INF/application.xml).</td>
35 <td valign="top" align="center">Yes, unless update is set to true</td>
36 </tr>
37 <tr>
38 <td valign="top">basedir</td>
39 <td valign="top">the directory from which to jar the files.</td>
40 <td valign="top" align="center">No</td>
41 </tr>
42 <tr>
43 <td valign="top">compress</td>
44 <td valign="top">Not only store data but also compress them,
45 defaults to true. Unless you set the <em>keepcompression</em>
46 attribute to false, this will apply to the entire archive, not
47 only the files you've added while updating.</td>
48 <td align="center" valign="top">No</td>
49 </tr>
50 <tr>
51 <td valign="top">keepcompression</td>
52 <td valign="top">For entries coming from existing archives (like
53 nested <em>zipfileset</em>s or while updating the archive), keep
54 the compression as it has been originally instead of using the
55 <em>compress</em> attribute. Defaults false. <em>Since Ant
56 1.6</em></td>
57 <td align="center" valign="top">No</td>
58 </tr>
59 <tr>
60 <td valign="top">encoding</td>
61 <td valign="top">The character encoding to use for filenames
62 inside the archive. Defaults to UTF8. <strong>It is not
63 recommended to change this value as the created archive will most
64 likely be unreadable for Java otherwise.</strong></td>
65 <td align="center" valign="top">No</td>
66 </tr>
67 <tr>
68 <td valign="top">filesonly</td>
69 <td valign="top">Store only file entries, defaults to false</td>
70 <td align="center" valign="top">No</td>
71 </tr>
72 <tr>
73 <td valign="top">includes</td>
74 <td valign="top">comma- or space-separated list of patterns of files that must be
75 included. All files are included when omitted.</td>
76 <td valign="top" align="center">No</td>
77 </tr>
78 <tr>
79 <td valign="top">includesfile</td>
80 <td valign="top">the name of a file. Each line of this file is
81 taken to be an include pattern</td>
82 <td valign="top" align="center">No</td>
83 </tr>
84 <tr>
85 <td valign="top">excludes</td>
86 <td valign="top">comma- or space-separated list of patterns of files that must be
87 excluded. No files (except default excludes) are excluded when omitted.</td>
88 <td valign="top" align="center">No</td>
89 </tr>
90 <tr>
91 <td valign="top">excludesfile</td>
92 <td valign="top">the name of a file. Each line of this file is
93 taken to be an exclude pattern</td>
94 <td valign="top" align="center">No</td>
95 </tr>
96 <tr>
97 <td valign="top">defaultexcludes</td>
98 <td valign="top">indicates whether default excludes should be used or not
99 (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when omitted.</td>
100 <td valign="top" align="center">No</td>
101 </tr>
102 <tr>
103 <td valign="top">manifest</td>
104 <td valign="top">the manifest file to use.</td>
105 <td valign="top" align="center">No</td>
106 </tr>
107 <tr>
108 <td valign="top">update</td>
109 <td valign="top">indicates whether to update or overwrite
110 the destination file if it already exists. Default is &quot;false&quot;.</td>
111 <td valign="top" align="center">No</td>
112 </tr>
113 <tr>
114 <td valign="top">duplicate</td>
115 <td valign="top">behavior when a duplicate file is found. Valid values are &quot;add&quot;, &quot;preserve&quot;, and &quot;fail&quot;. The default value is &quot;add&quot;. </td>
116 <td valign="top" align="center">No</td>
117 </tr>
118 <tr>
119 <td valign="top">roundup</td>
120 <td valign="top">Whether the file modification times will be
121 rounded up to the next even number of seconds.<br>
122 Zip archives store file modification times with a granularity of
123 two seconds, so the times will either be rounded up or down. If
124 you round down, the archive will always seem out-of-date when you
125 rerun the task, so the default is to round up. Rounding up may
126 lead to a different type of problems like JSPs inside a web
127 archive that seem to be slightly more recent than precompiled
128 pages, rendering precompilation useless.<br>
129 Defaults to true. <em>Since Ant 1.6.2</em></td>
130 <td align="center" valign="top">No</td>
131 </tr>
132</table>
133<h3>Nested elements</h3>
134<h4>metainf</h4>
135<p>The nested <code>metainf</code> element specifies a <a
136href="../CoreTypes/fileset.html">FileSet</a>. All files included in this fileset will
137end up in the <code>META-INF</code> directory of the ear file. If this
138fileset includes a file named <code>MANIFEST.MF</code>, the file is
139ignored and you will get a warning.</p>
140<h2>Example</h2>
141<pre>
142 &lt;ear destfile=&quot;${build.dir}/myapp.ear&quot; appxml=&quot;${src.dir}/metadata/application.xml&quot;&gt;
143 &lt;fileset dir=&quot;${build.dir}&quot; includes=&quot;*.jar,*.war&quot;/&gt;
144 &lt;/ear&gt;
145</pre>
146<hr>
147<p align="center">Copyright &copy; 2001-2004 The Apache Software Foundation. All rights
148Reserved.</p>
149
150</body>
151</html>
152
153
Note: See TracBrowser for help on using the repository browser.