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: Relentless</title> |
||
5 | </head> |
||
6 | |||
7 | <body> |
||
8 | <h1>Relentless</h1> |
||
9 | |||
10 | <p>The <relentless> task will execute all of the |
||
11 | nested tasks, regardless of whether one or more of the |
||
12 | nested tasks fails. When <relentless> has completed |
||
13 | executing the nested tasks, it will either |
||
14 | <ul> |
||
15 | <li>fail, if any one or more of the nested tasks failed; or |
||
16 | <li>succeed, if all of the nested tasks succeeded. |
||
17 | </ul> |
||
18 | An appropriate message will be written to the log. |
||
19 | </p> |
||
20 | <P> |
||
21 | Tasks are executed in the order that they appear within the |
||
22 | <relentless> task. It is up to the user to ensure that |
||
23 | relentless execution of the |
||
24 | nested tasks is safe. |
||
25 | </p> |
||
26 | <p><em> |
||
27 | This task only works for ant version greater than or equal |
||
28 | to ant 1.6.0. |
||
29 | </em> |
||
30 | </p> |
||
31 | |||
32 | <h2>Parameters</h2> |
||
33 | <table border="1" cellpadding="2" cellspacing="0"> |
||
34 | <tr> |
||
35 | <th>Attribute</th> |
||
36 | <th>Description</th> |
||
37 | <th>Required</th> |
||
38 | </tr> |
||
39 | <tr> |
||
40 | <td valign="top">description</td> |
||
41 | <td valign="top">A string that will be included in the log output. This |
||
42 | can be useful for helping to identify sections of large Ant builds.</td> |
||
43 | <td align="center" valign="top">No</td> |
||
44 | </tr> |
||
45 | <tr> |
||
46 | <td valign="top">terse</td> |
||
47 | <td valign="top">Setting this to <code>true</code> will eliminate some of the progress |
||
48 | output generated by <relentless>. This can reduce clutter in some |
||
49 | cases. The default value is <code>false</code>.</td> |
||
50 | <td align="center" valign="top">No</td> |
||
51 | </tr> |
||
52 | </table> |
||
53 | |||
54 | <h2>Nested elements</h2> |
||
55 | |||
56 | <h3>task list</h3> |
||
57 | |||
58 | <p> |
||
59 | The only nested element supported by <relentless> is a list of tasks |
||
60 | to be executed. At least one task must be specified. |
||
61 | </p> |
||
62 | <P> |
||
63 | It is important to note that <relentless> only proceeds relentlessly |
||
64 | from one task to the next - it does <b>not</b> apply recursively to any tasks |
||
65 | that might be invoked by these |
||
66 | nested tasks. If a nested task invokes some other list of tasks (perhaps |
||
67 | by <antcall> for example), and one of those other tasks fails, then the |
||
68 | nested task will stop at that point. |
||
69 | </p> |
||
70 | |||
71 | <h3>Example</h3> |
||
72 | <p> |
||
73 | A relentless task to print out the first five canonical variable names: |
||
74 | <blockquote> |
||
75 | <pre><relentless description="The first five canonical variable names."> |
||
76 | <echo>foo</echo> |
||
77 | <echo>bar</echo> |
||
78 | <echo>baz</echo> |
||
79 | <echo>bat</echo> |
||
80 | <echo>blah</echo> |
||
81 | </relentless></pre> |
||
82 | </blockquote> |
||
83 | which should produce output looking more or less like |
||
84 | <blockquote> |
||
85 | <pre>[relentless] Relentlessly executing: The first five canonical variable names. |
||
86 | [relentless] Executing: task 1 |
||
87 | [echo] foo |
||
88 | [relentless] Executing: task 2 |
||
89 | [echo] bar |
||
90 | [relentless] Executing: task 3 |
||
91 | [echo] baz |
||
92 | [relentless] Executing: task 4 |
||
93 | [echo] bat |
||
94 | [relentless] Executing: task 5 |
||
95 | [echo] blah |
||
96 | [relentless] All tasks completed successfully.</pre> |
||
97 | </blockquote> |
||
98 | </p> |
||
99 | If you change the first line to set the <code>terse</code> parameter, |
||
100 | <pre> <relentless terse="true" description="The first five canonical variable names."/></pre>the |
||
101 | output will look more like this: |
||
102 | <blockquote> |
||
103 | <pre>[relentless] Relentlessly executing: The first five canonical variable names. |
||
104 | [echo] foo |
||
105 | [echo] bar |
||
106 | [echo] baz |
||
107 | [echo] bat |
||
108 | [echo] blah |
||
109 | [relentless] All tasks completed successfully.</pre> |
||
110 | </blockquote> |
||
111 | </p> |
||
112 | <p> |
||
113 | If we change the third task to deliberately fail |
||
114 | <blockquote> |
||
115 | <pre><relentless terse="true" description="The first five canonical variable names."> |
||
116 | <echo>foo</echo> |
||
117 | <echo>bar</echo> |
||
118 | <fail>baz</fail> |
||
119 | <echo>bat</echo> |
||
120 | <echo>blah</echo> |
||
121 | </relentless></pre> |
||
122 | </blockquote> |
||
123 | then the output should look something like this. |
||
124 | <blockquote> |
||
125 | <pre>[relentless] Relentlessly executing: The first five canonical variable names. |
||
126 | [echo] foo |
||
127 | [echo] bar |
||
128 | [relentless] Task task 3 failed: baz |
||
129 | [echo] bat |
||
130 | [echo] blah |
||
131 | |||
132 | BUILD FAILED |
||
133 | /home/richter/firmware/sensor/build.xml:1177: Relentless execution: 1 of 5 tasks failed.</pre> |
||
134 | </blockquote> |
||
135 | </p> |
||
136 | <hr> |
||
137 | <p align="center">Copyright © 2005 Ant-Contrib Project. All |
||
138 | rights Reserved.</p> |
||
139 | |||
140 | </body> |
||
141 | </html> |