ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <>
Subject Re: Looping thru properties file
Date Tue, 09 Jul 2002 15:05:43 GMT
Write a custom Ant task to do this.

It literally would only be about 10 lines of code.  Simply create a Java
class with a public void execute() method, no need to extend any base class
or anything.  In execute() do what you want.

If you want to pass in the property file name from your build file, create

    public void setFile( file)

method and store off the file to use in execute().


    <taskdef name="mytask" classname="<your classname>"/>
    <mytask file="${some.file}"/>

Piece o' cake!  :))


----- Original Message -----
From: "Ramachandra, Arun" <>
To: <>
Sent: Tuesday, July 09, 2002 10:49 AM
Subject: Looping thru properties file

> I want to loop thru a properties file using ant.
> Specifically i have a number of (key,value) pairs.These are names of
> machines and their directories.I want to loop over them and create them.
> Any suggestions about how best to handle this?
> Any help would be greatly  appreciated.
>  -Arun
> --
> To unsubscribe, e-mail:   <>
> For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message