2002-02-22 08:29:37 +00:00
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Language" content="en-us">
|
|
|
|
<title>Echoproperties Task</title>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<h2><a name="echoproperties">echoproperties</a></h2>
|
|
|
|
<h3>Description</h3>
|
2003-05-14 12:40:18 +00:00
|
|
|
|
|
|
|
<p>Displays all the current properties (or a subset of them specified
|
|
|
|
by a nested <code><propertyset></code>) in the project. The
|
|
|
|
output can be sent to a file if desired. This task can be used as a
|
|
|
|
somewhat contrived means of returning data from an
|
|
|
|
<tt><ant></tt> invocation, but is really for debugging build
|
|
|
|
files.</p>
|
|
|
|
|
2002-02-22 08:29:37 +00:00
|
|
|
<h3>Parameters</h3>
|
|
|
|
<table border="1" cellpadding="2" cellspacing="0">
|
|
|
|
<tr>
|
|
|
|
<td valign="top"><b>Attribute</b></td>
|
|
|
|
<td valign="top"><b>Description</b></td>
|
|
|
|
<td align="center" valign="top"><b>Required</b></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">destfile</td>
|
|
|
|
<td valign="top">If specified, the value indicates the name of the
|
|
|
|
file to send the output of the statement to. The generated output file
|
|
|
|
is compatible for loading by any Java application as a property file.
|
|
|
|
If not specified, then the output will go to the Ant log.</td>
|
|
|
|
<td valign="top" align="center">No</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top">prefix</td>
|
|
|
|
<td valign="top">
|
|
|
|
a prefix which is used to filter the properties
|
|
|
|
only those properties starting with this prefix will be echoed.
|
|
|
|
<P>
|
|
|
|
</td>
|
|
|
|
<td valign="top" align="center">No</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td valign="top">failonerror</td>
|
|
|
|
<td valign="top">By default, the "failonerror" attribute is enabled.
|
|
|
|
If an error occurs while writing the properties to a file, and this
|
|
|
|
attribute is enabled, then a BuildException will be thrown, causing the
|
|
|
|
build to fail. If disabled, then IO errors will be reported as a log
|
|
|
|
statement, and the build will continue without failure from this task.</td>
|
|
|
|
<td valign="top" align="center">No</td>
|
|
|
|
</tr>
|
2003-05-14 12:28:54 +00:00
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td valign="top">format</td>
|
|
|
|
<td valign="top">One of <code>text</code> or <code>xml</code>.
|
|
|
|
Determines the output format. Defaults to <code>text</code>.</td>
|
|
|
|
<td valign="top" align="center">No</td>
|
|
|
|
</tr>
|
2002-02-22 08:29:37 +00:00
|
|
|
</table>
|
2003-05-14 12:40:18 +00:00
|
|
|
|
|
|
|
<h3>Parameters specified as nested elements</h3>
|
|
|
|
|
|
|
|
<h4>propertyset</h4>
|
|
|
|
|
|
|
|
<p>You can specify subsets of properties to be echoed with <a
|
|
|
|
href="../CoreTypes/propertyset.html">propertyset</a>s.</p>
|
|
|
|
|
|
|
|
<p><em>since Ant 1.6</em>.</p>
|
|
|
|
|
2002-02-22 08:29:37 +00:00
|
|
|
<h3>Examples</h3>
|
|
|
|
<blockquote><pre>
|
2002-09-04 11:05:19 +00:00
|
|
|
<echoproperties/>
|
2002-02-22 08:29:37 +00:00
|
|
|
</pre></blockquote>
|
|
|
|
<p>Report the current properties to the log.</p>
|
|
|
|
<blockquote><pre>
|
2002-09-04 11:05:19 +00:00
|
|
|
<echoproperties destfile="my.properties"/>
|
2002-02-22 08:29:37 +00:00
|
|
|
</pre></blockquote>
|
|
|
|
<p>Report the current properties to the file "my.properties", and will
|
|
|
|
fail the build if the file could not be created or written to.</p>
|
|
|
|
<blockquote><pre>
|
2004-11-19 09:07:12 +00:00
|
|
|
<echoproperties destfile="my.properties" failonerror="false"/>
|
2002-02-22 08:29:37 +00:00
|
|
|
</pre></blockquote>
|
|
|
|
<p>Report the current properties to the file "my.properties", and will
|
|
|
|
log a message if the file could not be created or written to, but will still
|
|
|
|
allow the build to continue.</p>
|
|
|
|
<blockquote><pre>
|
|
|
|
<echoproperties prefix="java."/>
|
|
|
|
</pre></blockquote>
|
|
|
|
<p>List all properties beginning with "java."</p>
|
2003-05-14 12:40:18 +00:00
|
|
|
<blockquote><pre>
|
|
|
|
<echoproperties>
|
|
|
|
<propertyset>
|
|
|
|
<propertyref prefix="java."/>
|
|
|
|
</propertyset>
|
|
|
|
</echoproperties>
|
|
|
|
</pre></blockquote>
|
|
|
|
<p>List all properties beginning with "java."</p>
|
2002-02-22 08:29:37 +00:00
|
|
|
|
|
|
|
<hr>
|
2004-02-09 21:50:10 +00:00
|
|
|
<p align="center">Copyright © 2002-2004 The Apache Software Foundation. All rights
|
2002-02-22 08:29:37 +00:00
|
|
|
Reserved.</p>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|