ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Property manipulation through javascript
Date Mon, 19 Nov 2001 07:24:07 GMT
On Fri, 16 Nov 2001, Jens Larsson <jens@west53.se> wrote:

> The target fires three times alright, but the instance property
> holds the first value (a) all three times.

No it doesn't, but the message or remotedir attributes of your tasks
won't get evaluated a second or third time - the best thing you can do
is to stop using properties and call the appropriate methods directly,
something like

      testenv = project.getProperty("testenv");
      service = project.getProperty("service");
>     for (var i=0; i < instances.length; i++) {
>       Project.setProperty("instance", instances[i]);
        ftp_transfer.setRemoteDir("/"+testenv+"/"+service+"/"+instances[i]);
>       ftp_transfer.execute();
>     }

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message