ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry V. Streepy, Jr." <>
Subject Re: Filter vs Replace
Date Tue, 07 Aug 2001 20:20:53 GMT
A key question is whether you copy the file or not.  If you're copying
the file, then I find that filters are the simplest to manage.

Further, I would store the replacement filters in a file, whose name
includes the target box name.  Thus loading the replacement filters is
the same for each deployment, and just the name of the deployment target
is changed.

I've done something very similar to this in my build process and it
works very well.

One note, unlike the property task, the filter task will kill the build
if the specified filter file is not present.  Just something to keep in
mind.  I had to create a conditional target and use available to avoid
trying to read a filter file that does not exist.

Hope this helps. wrote:
> I am trying to determine whether the Filter or the Replace core task better
> applies to my problem. I am trying to take a single file and create four
> differnt versions of the file by replacing a particular value in the original
> file. The value to be replaced is determined by the name of the box to which the
> file has to be deployed.
> ie.,    if name of box is abc, then replace @token1@ with xyz
>     if name of box is def, then replace @token1@ with 123
> Could anyone tell me what is the best approach to this probelm.
> Regards,
> Bharath Reddy,
> Business Applications Programmer,
> Metr1s Companies Inc.
> Phone # (217)373-3310

Larry V. Streepy, Jr.
Chief Technical Officer and VP of Engineering

Health Language, Inc.  -- "We speak the language of healthcare"

970/626-5028 (office) 
970/626-4425 (fax)    

View raw message