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: 4091
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 Filter task E-mail
User Rating: / 11
PoorBest 

Filter

Description

Sets a token filter for this project or read multiple token filter from an input file and sets these as filters. Token filters are used by all tasks that perform file copying operations through the Project commodity methods.

Note 1: the token string must not contain the separators chars (@).
Note 2: Either token and value attributes must be provided, or only the filtersfile attribute.

Parameters

Attribute Description Required
token the token string without @ Yes*
value the string that should be put to replace the token when the file is copied Yes*
filtersfile The file from which the filters must be read. This file must be a formatted as a property file. Yes*

* see notes 1 and 2 above parameters table.

Examples

  <filter token="year" value="2000"/>

  <copy todir="${dest.dir}" filtering="true">
    <fileset dir="${src.dir}"/>
  </copy>

will copy recursively all the files from the src.dir directory into the dest.dir directory replacing all the occurrences of the string @year@ with 2000.

  <filter filtersfile="deploy_env.properties"/>
will read all property entries from the deploy_env.properties file and set these as filters.

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.