ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dylan Schiemann <dyl...@yahoo.com>
Subject Re: Script task, listing of available objects
Date Thu, 14 Feb 2002 18:46:43 GMT
I have placed a first draft of my learning about
JavaScript in Ant at
http://www.sitepen.com/javascript.html

It is a modest start, with the only useful example so
far showing how to create and execute an xslt task
from JavaScript, but I hope someone will find it
useful.

The next thing I hope to add is an example of reading
a properties file into JavaScript.

-Dylan Schiemann
http://www.sitepen.com/

--- Erik Hatcher <jakarta-ant@ehatchersolutions.com>
wrote:
> 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" <dylans@yahoo.com>
> To: <ant-user@jakarta.apache.org>
> 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:ant-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:ant-user-help@jakarta.apache.org>
> >
> >
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:ant-user-help@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message