ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Help - Passing Dynamic Values inside Script
Date Thu, 26 Jul 2001 05:49:23 GMT
On Wed, 25 Jul 2001, Sekar Varatharajan <svarath@rnm.ca> wrote:

> I want to call a target from with an Script(java Script) which is in
> a loop and i want to set a property value to be change on each
> iteration.  How can i do that???

Take a look at the second example in the documentation of <script>.  To
follow your example:

<target name="myTarget">
  <cvsProject id="stilgar" ...
</target>

<target name="leto">
  <script language="javascript"><![CDATA[
  for (i=0; i<11; i++) {
    stilgar.setName("Value");
    myTarget.execute();
  }
]]></script>

Stefan

Mime
View raw message