source: release-kits/lirk3/resources/gs3-release-maker/apache-ant-1.6.5/docs/manual/OptionalTasks/echoproperties.html@ 14982

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

initial import of LiRK3

File size: 3.5 KB
Line 
1<html>
2
3<head>
4<meta http-equiv="Content-Language" content="en-us">
5<title>Echoproperties Task</title>
6<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
7</head>
8
9<body>
10
11<h2><a name="echoproperties">echoproperties</a></h2>
12<h3>Description</h3>
13
14<p>Displays all the current properties (or a subset of them specified
15by a nested <code>&lt;propertyset&gt;</code>) in the project. The
16output can be sent to a file if desired. This task can be used as a
17somewhat contrived means of returning data from an
18<tt>&lt;ant&gt;</tt> invocation, but is really for debugging build
19files.</p>
20
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">destfile</td>
30 <td valign="top">If specified, the value indicates the name of the
31 file to send the output of the statement to. The generated output file
32 is compatible for loading by any Java application as a property file.
33 If not specified, then the output will go to the Ant log.</td>
34 <td valign="top" align="center">No</td>
35 </tr>
36 <tr>
37 <td valign="top">prefix</td>
38 <td valign="top">
39 a prefix which is used to filter the properties
40 only those properties starting with this prefix will be echoed.
41 <P>
42 </td>
43 <td valign="top" align="center">No</td>
44 </tr>
45
46
47
48 <tr>
49 <td valign="top">failonerror</td>
50 <td valign="top">By default, the "failonerror" attribute is enabled.
51 If an error occurs while writing the properties to a file, and this
52 attribute is enabled, then a BuildException will be thrown, causing the
53 build to fail. If disabled, then IO errors will be reported as a log
54 statement, and the build will continue without failure from this task.</td>
55 <td valign="top" align="center">No</td>
56 </tr>
57
58 <tr>
59 <td valign="top">format</td>
60 <td valign="top">One of <code>text</code> or <code>xml</code>.
61 Determines the output format. Defaults to <code>text</code>.</td>
62 <td valign="top" align="center">No</td>
63 </tr>
64</table>
65
66<h3>Parameters specified as nested elements</h3>
67
68<h4>propertyset</h4>
69
70<p>You can specify subsets of properties to be echoed with <a
71href="../CoreTypes/propertyset.html">propertyset</a>s.</p>
72
73<p><em>since Ant 1.6</em>.</p>
74
75<h3>Examples</h3>
76<blockquote><pre>
77 &lt;echoproperties/&gt;
78</pre></blockquote>
79<p>Report the current properties to the log.</p>
80<blockquote><pre>
81 &lt;echoproperties destfile="my.properties"/&gt;
82</pre></blockquote>
83<p>Report the current properties to the file "my.properties", and will
84fail the build if the file could not be created or written to.</p>
85<blockquote><pre>
86 &lt;echoproperties destfile="my.properties" failonerror="false"/&gt;
87</pre></blockquote>
88<p>Report the current properties to the file "my.properties", and will
89log a message if the file could not be created or written to, but will still
90allow the build to continue.</p>
91<blockquote><pre>
92 &lt;echoproperties prefix="java."/&gt;
93</pre></blockquote>
94<p>List all properties beginning with "java."</p>
95<blockquote><pre>
96 &lt;echoproperties&gt;
97 &lt;propertyset&gt;
98 &lt;propertyref prefix="java."/&gt;
99 &lt;/propertyset&gt;
100 &lt;/echoproperties&gt;
101</pre></blockquote>
102<p>List all properties beginning with "java."</p>
103
104<hr>
105<p align="center">Copyright &copy; 2002-2004 The Apache Software Foundation. All rights
106Reserved.</p>
107
108</body>
109</html>
110
Note: See TracBrowser for help on using the repository browser.