Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1777 | jmachado | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
2 | <html> |
||
3 | <head> |
||
4 | <title>Ant-contrib Tasks: Foreach</title> |
||
5 | </head> |
||
6 | |||
7 | <body> |
||
8 | <h1>Foreach</h1> |
||
9 | |||
10 | <p>The foreach task iterates over a list, a list of paths, or |
||
11 | both. If both, list and paths, are specified, the list will be |
||
12 | evaluated first. Nested paths are evaluated in the order they |
||
13 | appear in the task.</p> |
||
14 | |||
15 | <h2>Parameters</h2> |
||
16 | <table border="1" cellpadding="2" cellspacing="0"> |
||
17 | <tr> |
||
18 | <th>Attribute</th> |
||
19 | <th>Description</th> |
||
20 | <th>Required</th> |
||
21 | </tr> |
||
22 | <tr> |
||
23 | <td valign="top">list</td> |
||
24 | <td valign="top">The list of values to process, with the |
||
25 | delimiter character, indicated by the "delimiter" |
||
26 | attribute, separating each value.</td> |
||
27 | <td align="center" valign="top">Yes, unless a nested Fileset |
||
28 | has been specified.</td> |
||
29 | </tr> |
||
30 | <tr> |
||
31 | <td valign="top">target</td> |
||
32 | <td valign="top">Name of the target to call for each token or |
||
33 | matched file.</td> |
||
34 | <td align="center" valign="top">Yes</td> |
||
35 | </tr> |
||
36 | <tr> |
||
37 | <td valign="top">param</td> |
||
38 | <td valign="top">Name of the parameter to pass the tokens or |
||
39 | files in as to the target.</td> |
||
40 | <td align="center" valign="top">Yes</td> |
||
41 | </tr> |
||
42 | <tr> |
||
43 | <td valign="top">delimiter</td> |
||
44 | <td valign="top">The delimiter characters that separates the |
||
45 | values in the "list" attribute. Each character in the |
||
46 | supplied string can act as a delimiter. This follows the semantics |
||
47 | of the StringTokenizer class.</td> |
||
48 | <td align="center" valign="top">No, defaults to ",".</td> |
||
49 | </tr> |
||
50 | <tr> |
||
51 | <td valign="top">inheritall</td> |
||
52 | <td valign="top">If <code>true</code>, pass all properties to |
||
53 | the called target. Defaults to <code>false</code>.</td> |
||
54 | <td align="center" valign="top">No</td> |
||
55 | </tr> |
||
56 | <tr> |
||
57 | <td valign="top">inheritrefs</td> |
||
58 | <td valign="top">If <code>true</code>, pass all references to the |
||
59 | the called target. Defaults to <code>false</code>.</td> |
||
60 | <td align="center" valign="top">No</td> |
||
61 | </tr> |
||
62 | <tr> |
||
63 | <td valign="top">parallel</td> |
||
64 | <td valign="top">If <code>true</code>, all instances of the called |
||
65 | target will execute in parallel. Defaults to <code>false</code>, |
||
66 | which forces sequential execution of the targets. It is up to |
||
67 | the caller to ensure that parallel execution is safe. This is |
||
68 | accomplished through the means of the "parallel" task contained |
||
69 | in the ANT core.</td> |
||
70 | <td align="center" valign="top">No</td> |
||
71 | </tr> |
||
72 | <tr> |
||
73 | <td valign="top">maxThreads</td> |
||
74 | <td valign="top">The maximum number of allowable threads when executing |
||
75 | in parallel.</td> |
||
76 | <td align="center" valign="top">No. Defaults to 5.</td> |
||
77 | </tr> |
||
78 | <tr> |
||
79 | <td valign="top">trim</td> |
||
80 | <td valign="top">If <code>true</code>, any leading or trailing |
||
81 | whitespace will be removed from the list item before it is passed |
||
82 | to the requested target |
||
83 | </td> |
||
84 | <td align="center" valign="top">No. Defaults to false.</td> |
||
85 | </tr> |
||
86 | </table> |
||
87 | |||
88 | <h2>Parameters specified as nested elements</h2> |
||
89 | |||
90 | <a name="path"><h3>path</h3></a> |
||
91 | |||
92 | <p><a href="http://ant.apache.org/manual/using.html#path">Path</a>s |
||
93 | are used to select sets of files or directories to iterate over.</p> |
||
94 | |||
95 | <p>Using a path allows you to determine the order by which files |
||
96 | are considered by using |
||
97 | <a href="http://ant.apache.org/manual/CoreTypes/filelist.html">filelist</a>s |
||
98 | or explicit <code>pathelements</code>. You also can specify |
||
99 | whether you want to iterate over files or directories by chosing |
||
100 | either filesets or |
||
101 | <a href="http://ant.apache.org/manual/CoreTypes/dirset.html">dirset</a>s.</p> |
||
102 | |||
103 | <a name="fileset"><h3>fileset</h3></a> |
||
104 | |||
105 | <p><a href="http://ant.apache.org/manual/CoreTypes/fileset.html">FileSet</a>s |
||
106 | are used to select sets of files to iterate over. <strong>This |
||
107 | element is deprecated, use <a href="#path">nested path elements</a> |
||
108 | instead.</strong></p> |
||
109 | |||
110 | <h3>param</h3> |
||
111 | |||
112 | <p>Specifies the properties to set before running the specified |
||
113 | target. See <a href="http://ant.apache.org/manual/CoreTasks/property.html">property</a> |
||
114 | for usage guidelines.</p> |
||
115 | |||
116 | <h3><a name="reference">reference</a></h3> |
||
117 | |||
118 | <p>Used to chose references that shall be copied into the new |
||
119 | project, optionally changing their id.</p> |
||
120 | |||
121 | <table border="1" cellpadding="2" cellspacing="0"> |
||
122 | <tr> |
||
123 | <th>Attribute</th> |
||
124 | <th>Description</th> |
||
125 | <th>Required</th> |
||
126 | </tr> |
||
127 | <tr> |
||
128 | <td valign="top">refid</td> |
||
129 | <td valign="top">The id of the reference in the calling project.</td> |
||
130 | <td valign="top" align="center">Yes</td> |
||
131 | </tr> |
||
132 | <tr> |
||
133 | <td valign="top">torefid</td> |
||
134 | <td valign="top">The id of the reference in the called project.</td> |
||
135 | <td valign="top" align="center">No, defaults to the value of |
||
136 | refid.</td> |
||
137 | </tr> |
||
138 | </table> |
||
139 | |||
140 | <hr> |
||
141 | <p align="center">Copyright © 2002-2004 Ant-Contrib Project. All |
||
142 | rights Reserved.</p> |
||
143 | |||
144 | </body> |
||
145 | </html> |