ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: [ANN] Apache AntUnit 1.0 Beta 1 Released
Date Mon, 25 Sep 2006 03:35:09 GMT
On Sun, 24 Sep 2006, Paul King <> wrote:


> I was trying to create an AntUnit example with Groovy - mainly just
> to check out some namespace support which has just been added to
> Groovy's AntBuilder and currently have the following example
> working:
>   import
>   def ant = new AntBuilder()
>   def url = this.class.getResource('org/apache/ant/antunit/antlib.xml')
>   Antlib.createAntlib(ant.project, url, 'antlib:org.apache.ant.antunit').execute()
>   ant.assertFileDoesntExist(file:'copytest1.tmp')
>   ant.copy(file:'antunit.groovy', tofile:'copytest1.tmp')
>   ant.assertFileExists(file:'copytest1.tmp')
>   ant.delete(file:'copytest1.tmp')


> Does the "Antlib.createAntlib" part look like a violation of what I
> should be doing from an Ant perspective?

You rely on an internal API - granted, technically it is public - so
you are in danger.  We try not to break our API, but we are more
willing to do so than to break the XML level API.

>From the Groovy user side of view, I'd expect this to be hidden by
AntBuilder.  Something like


> Also, I was expecting to have to muck around with namespaces but
> they just dissappeared from the example at the moment. (Not sure
> this is a good thing or not.)

I don't think it is, since Antlibs are also a way to solve naming
conflicts and you loose that abiblity IIUC.


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

View raw message