ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stirling, Scott" <>
Subject RE: scripting tips
Date Fri, 31 Oct 2003 15:03:52 GMT
> From: Erik Hatcher []

> Ant 1.6 has <scriptdef> now.... and this is how I'll be starting Ant 
> tasks from now on.

Thanks for pointing this out, Eric.  I hadn't noticed the appearance of Scriptdef in the optional
tasks docs.  BTW, the header on the doc page for Scriptdef (scriptdef.html) says "Script."
 Can you just fix it in CVS, or would you prefer to have a doc bug entered?

> When does the type information become a problem for you?  
> It's just the initial headache of crafting a call to 
> setSrc, right?   But once you match up the types all is 
> well, I'm guessing.

Yes, exactly.  You kinda need to keep the API docs or the Ant source nearby.  For example,
without looking in the source or cracking open the Ant jar file to find the
for tasks, I would have had no idea that the "unzip" task corresponded to the Expand class,
which I needed to know to look up the Java argument types for the task setters.

> I think this is just going to be a manual type of thing [. . .]

That's OK.  I was/am looking for best practices and tips on scripting Ant with <script>,
i.e., things I hadn't thought of, things more experienced scripters would know short-cuts
for, Ant scripting idioms, basically.

One more question: in the Scriptdef doc, it says nested <element> can take a "type"
attribute which is the "name of an Ant task or type [. . ..] alternative to specifying the
class name directly."  Actually, that's pretty clear, but it might be handy to have a list
of type names right there.  Anyway, I'll be playing with <scriptdef> now.  Thanks again.

Scott Stirling
Workscape, Inc.

This message is intended only for the use of the intended recipient and
may contain information that is PRIVILEGED and/or CONFIDENTIAL.  If you
are not the intended recipient, you are hereby notified that any use,
dissemination, disclosure or copying of this communication is strictly
prohibited.  If you have received this communication in error, please
destroy all copies of this message and its attachments and notify us

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message