Hi,

I've taken a quick look at the possibilities the <script> task would
offer, see this:

<project name="testscript" default="main">
  <target name="sub">
    <echo id="theEcho" />
  </target>

  <target name="sub1">
    <script language="javascript"><![CDATA[
      theEcho.setMessage("In sub1");
      sub.execute();
    ]]></script>
  </target>

  <target name="sub2">
    <script language="javascript"><![CDATA[
      theEcho.setMessage("In sub2");
      sub.execute();
    ]]></script>
  </target>

  <target name="main" depends="sub1,sub2" />
</project>

and this:

[EMAIL PROTECTED] ~/jakarta >ant -buildfile testscript.xml 
Buildfile: testscript.xml

sub1:
In sub1

sub2:
In sub2

main:

BUILD SUCCESSFUL

My feeling at the moment is that we could go the direction of saying:

Don't add more logic, procedural aspects, scoped properties or
whatever is missing to Ant, do it with scripting. 

The same I've just done with JavaScript could easily be done with a
task written in Java - but actually this one took me ten minutes
(spending five of them reading the code of Script.java and some doc of
BSF and another four on getting the capitalization of "javascript"
right).

I'm willing to start writing a scripting tutorial (would you please
help me Sam) if this is all that's needed.

What do you think?

Stefan

Reply via email to