Class EchoProperties

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.optional.EchoProperties
All Implemented Interfaces:
Cloneable

public class EchoProperties extends Task
Displays all the current properties in the build. The output can be sent to a file if desired.

Attribute "destfile" defines a file to send the properties to. This can be processed as a standard property file later.

Attribute "prefix" defines a prefix which is used to filter the properties only those properties starting with this prefix will be echoed.

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. If disabled, then IO errors will be reported as a log statement, but no error will be thrown.

Examples:

  <echoproperties  />
 
Report the current properties to the log.
  <echoproperties destfile="my.properties" />
 
Report the current properties to the file "my.properties", and will fail the build if the file could not be created or written to.
  <echoproperties destfile="my.properties" failonerror="false"
      prefix="ant" />
 
Report all properties beginning with 'ant' 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.
Since:
Ant 1.5