Ant Dev with java gives an example. I used DynamicConfigurator to implement custom conditions in bugzilla bug no : 17199 I did not have the problems you describe.
Peter On Thursday 20 March 2003 18:45, Brett Wooldridge wrote: > Hello list, > I'm trying to use DynamicConfigurator and am having some > difficulty. I have a class that implements DynamicConfigurator > and is used to wrap around other tasks, like: > > <mywrapper someattr="somevalue"> > <junit ...> > <yada yada> > </junit> > </mywrapper> > > Further, mywrapper is being used inside of a parallel task > (it may not matter, but I'm trying to provide all data). > > When I run ant, I see that createDynamicElement() gets > called twice for the <junit> element, and further that > setDynamicAttribute() gets called twice for someattr. > > Now, setDynamicAttribute() getting called twice is mostly > harmless, but it seems that creating two Objects due to > createDynamicElement() being called twice seems like > a bug. How can I tell I'm getting called a second time > for a first instance of <junit> or called the first time for a > second instance of <junit>? > > I cannot find any usage of DynamicConfigurator within the > 1.5.2 ant source tree (ie no "implementations") to compare > my code to. > > I put a Thread.dumpStack() inside of my implementations > of those methods, and can provide the stacks for the two > calls (they ARE different) if that would help. > > Thanks in advance. > > Brett Wooldridge > Sr. Software Eng. > IronGrid, Inc.