ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: scripting tips
Date Tue, 28 Oct 2003 09:30:26 GMT
On Monday, October 27, 2003, at 05:49  PM, Stirling, Scott wrote:
> Anyone know of a site or resources (beyond the Hatcher/Loughran book) 
> for scripting tips with the Ant <script> task?

What?!  You need more?!  :))

> <script> is proving to be a great way to prototype new Ant tasks, but 
> there's a real art to it.  One recurring problem for me as I get the 
> hang of it is learning/remembering you have to know the actual 
> argument type for task setters.

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

> So, e.g., <unzip src="foo" dest="bar"> corresponds to 
> setSrc()/setDest() methods on the Extract task that take 
>, not Strings.

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.

I think this is just going to be a manual type of thing (unless you 
wrote some type detector that morphed strings to the expected type) 
because of the loosely typed language calling into a strongly typed 
language.  Although, Ant itself is doing the String->type conversions 
for regular XML specified tasks, so you could go through that mechanism 
somehow using IntrospectionHelper stuff.


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

View raw message