ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject [PATCH] Script enhancement to standardize the "project" object exposed
Date Fri, 28 Sep 2001 03:57:23 GMT
Well, with a +1000000, I couldn't resist making the change I proposed.  :)

Attached is a patch against the ANT_14 versions of Script.java and the
documentation file for this task.

Here is the sample build file that I used to test my change with:

<project default="test">
  <target name="test">
    <script language="javascript"> <![CDATA[
      echo = project.createTask("echo");
      main.addTask(echo);
      for (i=1; i<=10; i++) {
        echo.setMessage(i*i);
        echo.execute();
      }
    ]]> </script>
  </target>

  <target name="main"/>
</project>

----- Original Message -----
From: "Peter Donald" <donaldp@apache.org>
To: <ant-user@jakarta.apache.org>
Sent: Thursday, September 27, 2001 5:01 PM
Subject: Re: Javascript errors


> On Fri, 28 Sep 2001 05:06, Erik Hatcher wrote:
> > This problem actually could be alleviated with a patch to the <script>
task
> > such that the project reference was fed to BSF with the name "project"
> > rather than as the name of the project.   I've got a few such similar
> > patches on my to-do list for the <script> task to make using it easier.
I
> > won't have time to get to this patch very soon though, but it appears to
be
> > a straightforward change.
>
> +1000000 ;)
>
> --
> Cheers,
>
> Pete
>
> When a stupid man is doing something he's ashamed of, he always
> declares that it is his duty.
> George Bernard Shaw
>

Mime
View raw message