ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: Free-form ANT Task Structure
Date Tue, 20 May 2003 16:49:23 GMT
Yep, you can mix and match. DynaConf picks up only what's not explicitly
declared in the class. I'll send you my XmlFragment if you care for it. The
toString() is broken, since I had to modify Ant's DOMElementWriter to accept
a DOM Node instead of an Element. --DD

> -----Original Message-----
> From: Berin Loritsch [mailto:bloritsch@apache.org]
> Sent: Tuesday, May 20, 2003 11:38 AM
> To: dev@ant.apache.org
> Subject: Re: Free-form ANT Task Structure
> 
> peter reilly wrote:
> > To embed the config information, the easiest
> > is to map the info to objects.
> >
> > Ant introspection is very powerfull and easy
> > to use for normal java data object.
> 
> The problem is that it only works when you know in advance
> what the configuration elements are going to be.  In this
> example, that is not the case.
> 
> >
> > Alternatively one can use the DynamicConfigurator
> > interface. This provides the name of the unknown element
> > and the name/value of unknown attributes.
> >
> 
> That might be something worth pursuing.  Now, can I have
> a mixture of DyanimicConfigurator objects and mapped
> objects in the *same* task?
> 
> Or more importantly as a child of one of the mapped
> objects?
> 
> For example:
> 
> <integration-test>
>    <test on-components="foo,bar">
>      <include name="**/XYZComp/*Test"/>
>      <configuration>
>         <xyz-comp id="foo"/>
>         <zyx-comp id="bar">
>           <arbitrary value="null"/>
>         </zyx-comp>
>      </configuration>
>    </test>
> </integration-test>
> 
> The child of the <configuration/> element is completely
> free-form, although the rest of the task elements would
> map to real objects.
> 
> Is there an Task already written that uses the DynamicConfigurator
> where I can see how it works with it?
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org

Mime
View raw message