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

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

initial import of LiRK3

File size: 2.9 KB
Line 
1<html>
2
3<head>
4<meta http-equiv="Content-Language" content="en-us">
5<title>Echo Task</title>
6<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
7</head>
8
9<body>
10
11<h2><a name="echo">Echo</a></h2>
12<h3>Description</h3>
13<p>Echoes a message to the current loggers and listeners which
14means <tt>System.out</tt> unless overridden. A <tt>level</tt>
15can be specified, which controls at what logging level the message is
16filtered at.
17<p>
18The task can also echo to a file, in which case the option to append rather
19than overwrite the file is available, and the <tt>level</tt> option is
20ignored</p>
21<h3>Parameters</h3>
22<table border="1" cellpadding="2" cellspacing="0">
23 <tr>
24 <td valign="top"><b>Attribute</b></td>
25 <td valign="top"><b>Description</b></td>
26 <td align="center" valign="top"><b>Required</b></td>
27 </tr>
28 <tr>
29 <td valign="top">message</td>
30 <td valign="top">the message to echo.</td>
31 <td valign="top" align="center">Yes, unless data is included in a
32 character section within this element.</td>
33 </tr>
34 <tr>
35 <td valign="top">file</td>
36 <td valign="top">the file to write the message to.</td>
37 <td valign="top" align="center">No</td>
38 </tr>
39 <tr>
40 <td valign="top">append</td>
41 <td valign="top">Append to an existing file?</td>
42 <td valign="top" align="center">No - default is false.</td>
43 </tr>
44 <tr>
45 <td valign="top">level</td>
46 <td valign="top">Control the level at which this message is reported.
47 One of "error", "warning", "info", "verbose", "debug"</td>
48 <td valign="top" align="center">No - default is "warning".</td>
49 </tr>
50
51
52
53</table>
54<h3>Examples</h3>
55<pre>
56&lt;echo message=&quot;Hello, world&quot;/&gt;
57</pre>
58<pre>
59&lt;echo message=&quot;Embed a line break:${line.separator}&quot;/&gt;
60</pre>
61<pre>
62&lt;echo&gt;Embed another:${line.separator}&lt;/echo&gt;
63</pre>
64<pre>
65&lt;echo&gt;This is a longer message stretching over
66two lines.
67&lt;/echo&gt;
68</pre>
69<pre>
70&lt;echo&gt;
71This is a longer message stretching over
72three lines; the first line is a blank
73&lt;/echo&gt;
74</pre>
75As XML parsers are wont to do, the first newline in the text element
76has been included in the text.
77
78<pre>&lt;echo message=&quot;Deleting drive C:&quot; level=&quot;debug&quot;/&gt;</pre>
79A message which only appears in <tt>-debug</tt> mode.
80<pre>&lt;echo level=&quot;error&quot;&gt;
81Imminent failure in the antimatter containment facility.
82Please withdraw to safe location at least 50km away.
83&lt;/echo&gt;
84</pre>
85A message which appears even in <tt>-quiet</tt> mode.
86
87<pre>&lt;echo file="runner.csh" append="false"&gt;#\!/bin/tcsh
88java-1.3.1 -mx1024m ${project.entrypoint} $$*
89</echo></pre>
90Generate a shell script by echoing to a file.
91Note the use of a double $ symbol to stop Ant
92filtering out the single $ during variable expansion
93<hr>
94
95<p align="center">Copyright &copy; 2000-2002,2004 The Apache Software Foundation. All rights
96Reserved.</p>
97
98</body>
99</html>
100
Note: See TracBrowser for help on using the repository browser.