ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: scripting tips
Date Tue, 28 Oct 2003 14:37:10 GMT
> From: Erik Hatcher [mailto:erik@ehatchersolutions.com]
> 
> On Monday, October 27, 2003, at 05:49  PM, Stirling, Scott wrote:
> 
> > So, e.g., <unzip src="foo" dest="bar"> corresponds to
> > setSrc()/setDest() methods on the Extract task that take
> > java.io.Files, 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.

Most Java scripting engines allow you to assign Bean-like properties
as if they were just simple members:

unzip = ...;
unzip.src = new File("foo");
unzip.dest = new File("bar");

So it shouldn't be much different than the XML syntax. You just have to be
aware that this will probably not perform the automatic String -> Type that
Ant core does, thus the need to pass an actual File above. Not tested...

--DD

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


Mime
View raw message