java left logo
java middle logo
java right logo
 

Home arrow Other API Tips
 
 
Main Menu
Home
Java Tutorials
Book Reviews
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Java Network
Java Forums
Java Blog




Most Visited Tips
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Book Reviews
Top Rated Tips
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Book Reviews


Statistics
Registered Users: 4101
Java SE Tips: 614
Java ME Tips: 202
Java EE Tips: 183
Other API Tips: 779
Java Applications: 298
Java Libraries: 209
Java Games: 16
Book Reviews:
 
 
 
How to use Echoproperties task E-mail
User Rating: / 0
PoorBest 

echoproperties

Description

Displays all the current properties (or a subset of them specified by a nested <propertyset>) 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 <ant> invocation, but is really for debugging build files.

Parameters

Attribute Description Required
destfile 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. No
prefix a prefix which is used to filter the properties only those properties starting with this prefix will be echoed.

No
failonerror 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. No
format One of text or xml. Determines the output format. Defaults to text. No

Parameters specified as nested elements

propertyset

You can specify subsets of properties to be echoed with propertysets.

since Ant 1.6.

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"/>

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.

  <echoproperties prefix="java."/>

List all properties beginning with "java."

  <echoproperties>
    <propertyset>

      <propertyref prefix="java."/>
    </propertyset>
  </echoproperties>

List all properties beginning with "java."

Source: Apache Ant


 Related Tips

 
< Prev   Next >

Page 1 of 0 ( 0 comments )

You can share your information about this topic using the form below!

Please do not post your questions with this form! Thanks.


Name (required)


E-Mail (required)

Your email will not be displayed on the site - only to our administrator
Homepage(optional)



Comment Enable HTML code : Yes No



 
       
         
     
 
 
 
   
 
 
java bottom left
java bottom middle
java bottom right
RSS 0.91 FeedRSS 1.0 FeedRSS 2.0 FeedATOM FeedOPML Feed

Home - About Us - Privacy Policy
Copyright 2005 - 2008 www.java-tips.org
Java is a trademark of Sun Microsystems, Inc.