1 | <html>
|
---|
2 |
|
---|
3 | <head>
|
---|
4 | <meta http-equiv="Content-Language" content="en-us">
|
---|
5 | <title>Copydir Task</title>
|
---|
6 | <link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
|
---|
7 | </head>
|
---|
8 |
|
---|
9 | <body>
|
---|
10 |
|
---|
11 | <h2><a name="copydir">Copydir</a></h2>
|
---|
12 | <h3><i>Deprecated</i></h3>
|
---|
13 | <p><i>This task has been deprecated. Use the Copy task instead.</i></p>
|
---|
14 | <h3>Description</h3>
|
---|
15 | <p>Copies a directory tree from the source to the destination.</p>
|
---|
16 | <p>It is possible to refine the set of files that are being copied. This can be
|
---|
17 | done with the <i>includes</i>, <i>includesfile</i>, <i>excludes</i>, <i>excludesfile</i> and <i>defaultexcludes</i>
|
---|
18 | attributes. With the <i>includes</i> or <i>includesfile</i> attribute you specify the files you want to
|
---|
19 | have included by using patterns. The <i>exclude</i> or <i>excludesfile</i> attribute is used to specify
|
---|
20 | the files you want to have excluded. This is also done with patterns. And
|
---|
21 | finally with the <i>defaultexcludes</i> attribute, you can specify whether you
|
---|
22 | want to use default exclusions or not. See the section on <a
|
---|
23 | href="../dirtasks.html#directorybasedtasks">directory based tasks</a>, on how the
|
---|
24 | inclusion/exclusion of files works, and how to write patterns.</p>
|
---|
25 | <p>This task forms an implicit <a href="../CoreTypes/fileset.html">FileSet</a> and
|
---|
26 | supports all attributes of <code><fileset></code>
|
---|
27 | (<code>dir</code> becomes <code>src</code>) as well as the nested
|
---|
28 | <code><include></code>, <code><exclude></code> and
|
---|
29 | <code><patternset></code> elements.</p>
|
---|
30 | <h3>Parameters</h3>
|
---|
31 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
32 | <tr>
|
---|
33 | <td valign="top"><b>Attribute</b></td>
|
---|
34 | <td valign="top"><b>Description</b></td>
|
---|
35 | <td align="center" valign="top"><b>Required</b></td>
|
---|
36 | </tr>
|
---|
37 | <tr>
|
---|
38 | <td valign="top">src</td>
|
---|
39 | <td valign="top">the directory to copy.</td>
|
---|
40 | <td valign="top" align="center">Yes</td>
|
---|
41 | </tr>
|
---|
42 | <tr>
|
---|
43 | <td valign="top">dest</td>
|
---|
44 | <td valign="top">the directory to copy to.</td>
|
---|
45 | <td valign="top" align="center">Yes</td>
|
---|
46 | </tr>
|
---|
47 | <tr>
|
---|
48 | <td valign="top">includes</td>
|
---|
49 | <td valign="top">comma- or space-separated list of patterns of files that must be
|
---|
50 | included. All files are included when omitted.</td>
|
---|
51 | <td valign="top" align="center">No</td>
|
---|
52 | </tr>
|
---|
53 | <tr>
|
---|
54 | <td valign="top">includesfile</td>
|
---|
55 | <td valign="top">the name of a file. Each line of this file is
|
---|
56 | taken to be an include pattern</td>
|
---|
57 | <td valign="top" align="center">No</td>
|
---|
58 | </tr>
|
---|
59 | <tr>
|
---|
60 | <td valign="top">excludes</td>
|
---|
61 | <td valign="top">comma- or space-separated list of patterns of files that must be
|
---|
62 | excluded. No files (except default excludes) are excluded when omitted.</td>
|
---|
63 | <td valign="top" align="center">No</td>
|
---|
64 | </tr>
|
---|
65 | <tr>
|
---|
66 | <td valign="top">excludesfile</td>
|
---|
67 | <td valign="top">the name of a file. Each line of this file is
|
---|
68 | taken to be an exclude pattern</td>
|
---|
69 | <td valign="top" align="center">No</td>
|
---|
70 | </tr>
|
---|
71 | <tr>
|
---|
72 | <td valign="top">defaultexcludes</td>
|
---|
73 | <td valign="top">indicates whether default excludes should be used or not
|
---|
74 | ("yes"/"no"). Default excludes are used when omitted.</td>
|
---|
75 | <td valign="top" align="center">No</td>
|
---|
76 | </tr>
|
---|
77 | <tr>
|
---|
78 | <td valign="top">filtering</td>
|
---|
79 | <td valign="top">indicates whether token filtering should take place during
|
---|
80 | the copy</td>
|
---|
81 | <td valign="top" align="center">No</td>
|
---|
82 | </tr>
|
---|
83 | <tr>
|
---|
84 | <td valign="top">flatten</td>
|
---|
85 | <td valign="top">ignore directory structure of source directory,
|
---|
86 | copy all files into a single directory, specified by the <code>dest</code>
|
---|
87 | attribute (default is <code>false</code>).</td>
|
---|
88 | <td valign="top" align="center">No</td>
|
---|
89 | </tr>
|
---|
90 | <tr>
|
---|
91 | <td valign="top">forceoverwrite</td>
|
---|
92 | <td valign="top">overwrite existing files even if the destination
|
---|
93 | files are newer (default is false).</td>
|
---|
94 | <td valign="top" align="center">No</td>
|
---|
95 | </tr>
|
---|
96 | </table>
|
---|
97 | <h3>Examples</h3>
|
---|
98 | <pre> <copydir src="${src}/resources"
|
---|
99 | dest="${dist}"
|
---|
100 | /></pre>
|
---|
101 | <p>copies the directory <code>${src}/resources</code> to <code>${dist}</code>.</p>
|
---|
102 | <pre> <copydir src="${src}/resources"
|
---|
103 | dest="${dist}"
|
---|
104 | includes="**/*.java"
|
---|
105 | excludes="**/Test.java"
|
---|
106 | /></pre>
|
---|
107 | <p>copies the directory <code>${src}/resources</code> to <code>${dist}</code>
|
---|
108 | recursively. All java files are copied, except for files with the name <code>Test.java</code>.</p>
|
---|
109 | <pre> <copydir src="${src}/resources"
|
---|
110 | dest="${dist}"
|
---|
111 | includes="**/*.java"
|
---|
112 | excludes="mypackage/test/**"/></pre>
|
---|
113 | <p>copies the directory <code>${src}/resources</code> to <code>${dist}</code>
|
---|
114 | recursively. All java files are copied, except for the files under the <code>mypackage/test</code>
|
---|
115 | directory.</p>
|
---|
116 | <hr><p align="center">Copyright © 2000-2002,2004 The Apache Software Foundation. All rights
|
---|
117 | Reserved.</p>
|
---|
118 |
|
---|
119 | </body>
|
---|
120 | </html>
|
---|
121 |
|
---|