ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Clohosy <>
Subject Re: New Ant GUI - 'Ant's Nest'
Date Fri, 07 Jan 2005 15:31:20 GMT
Thank you Rich, Erik, and Dominique for your comments, I'll certainly look 
into them. When I first started looking into this around May-time, I could 
not find any easy way of extracting the information needed from the Ant 
class files. I tried everything, from reflection to the Ant API itself and 
could not find anything. The best I could do was to look for the bean 
conventions like getters and setters but I didn't want to rely on that. Alos 
there was no way of knowing if an attribute was required, or if it became 
required if another attribute was set, etc. That's way I was heading down 
the meta-data route with annotations, I didn't have a clue they were already 
marked up with @tags!

This is a university project, and at the moment time is running out so I 
have to prioritise what has to be included in the final version, so bear 
with me :-p But you all have definetely shed some light on what lies behind 
Ant, and I'm very grateful.


----- Original Message ----- 
From: "Erik Hatcher" <>
To: "Ant Users List" <>
Sent: Friday, January 07, 2005 12:25 AM
Subject: Re: New Ant GUI - 'Ant's Nest'

> And further, Ant itself was annotated with XDoclet @tags a few years ago 
> for auto-generation of documentation and with the plan to use it for 
> metadata generation for tools to use.  As far as I know, no tool vendor as 
> picked up on this metadata sadly.  I'm not sure how the 
> IntrospectionHelper improvements and the XDoclet tags (which probably have 
> not been kept up-to-date) synergize - though I suspect there is 
> information returned from introspection that would still make some Ant 
> tasks fail that do programmatic validation checks of data.  The @tags can 
> provide that additional information, such that only one of a set of 
> attributes may be used.
> Erik
> On Jan 6, 2005, at 6:04 PM, Dominique Devienne wrote:
>>> From: Rich Wagner []
>>> Have you considered using reflection, in addition to meta-model files?
>> In
>>> other words, imagine searching Ant's classpath for task classes, and
>> then
>>> using reflection to (for instance) discover what attributes each task
>>> class accepts.
>> Actually, instead of duplicating the reflection code in Ant, use the Ant
>> API itself. We have recently improved IntrospectionHelper to expose all
>> attributes and elements and extension points (add(X) methods) supported
>> by any bean (task/type/etc...), including whether it accepts nested
>> text.
>> Now with AntLibs, you can also auto-discover tasks/types by scanning the
>> classpath for antlib.xml resources, which is the most often used way to
>> declare an AntLib such that is works with the magic
>> namespace URIs (it then expect a package/name/antlib.xml resource).
>>> From the antlib.xml resources, you can know which classes to load and
>> feed to IntrospectionHelper to find out everything about them in terms
>> of attributes/elements/extensions-points/text supported.
>> Just my 2 cents. --DD
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message