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");
main.addTask(echo);
echo.setMessage(i*i);
}
]]> </script>
</target>
<target name="main" depends="setup" />
</project>
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