ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: Why Properties became immutable
Date Tue, 25 Jul 2000 02:40:41 GMT

Roger Vaughn wrote:
> With that in mind, it is frequently useful to have procedural
> constructs to use within a target.

For exactly people like you, I added a scripting task.  Here's an example I
posted previously as a demonstration of the virtually limitless power of
such a construct:

   <project name="squares" default="main" basedir=".">

     <target name="setup">

       <script language="javascript"> <![CDATA[

         for (i=1; i<=10; i++) {
           echo = squares.createTask("echo");

       ]]> </script>


     <target name="main" depends="setup" />


The point of this exercise is that I firmly believe that Ant should not
create yet another procedural language, but allow you to use whatever
language you already prefer.  Local variables, loops, affecting the overall
flow of execution the build - all these things are possible.

- Sam Ruby

View raw message