Just quickly, from the source code:
addBeans(project.getProperties());
addBeans(project.getUserProperties());
addBeans(project.getTargets());
addBeans(project.getReferences());
beans.put("project", getProject());
beans.put("self", this);
This means you get: all properties by name (as String's), all targets and
references by id, the Project object as "project", and the script task
itself (for logging and other task specific utilities) as "self".
There are some caveats... if you have two things with the same name/id, the
last one wins. If you have something named with an illegal Java name, it is
omitted.
Erik
----- Original Message -----
From: "Dylan Schiemann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 12, 2002 5:58 PM
Subject: Script task, listing of available objects
> Hi all,
>
> Is there a listing of the objects available to
> JavaScript using the script task? The documentation
> on the ant site is very light, and the examples on the
> mailing list are great, but without knowing where to
> find a list of the objects, it seems arbitrary. My
> knowledge of Java s very limited, but if the best
> thing to do is looking through the jars for the
> available objects I can do that. I just need a shove
> in the right direction.
>
> I'm looking to do things like:
>
> - Call a task iteratively and fill in the parameters
> for the task... such as the style task and passing
> parameters for each call.
>
> - Allow a script to access information from a
> properties file
>
> Using JavaScript with ant seems to be an often asked
> and often unanswered question on the list, so I would
> be willing to take any info that is passed along and
> start a JavaScript ant faq if that would be useful.
>
> Thanks,
>
> Dylan Schiemann
> http://www.sitepen.com/
>
> __________________________________________________
> Do You Yahoo!?
> Send FREE Valentine eCards with Yahoo! Greetings!
> http://greetings.yahoo.com
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>