ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brett Wooldridge" <br...@irongrid.com>
Subject RE: Dynamic Configurator
Date Mon, 24 Mar 2003 05:08:06 GMT
Stefan,
   Sorry for being slow getting back to you, I was recovering from an illness.  Here are to
two stack dumps I promised.  I put Thread.dumpStack() in my implementation of setDynamicAttribute().
 The build.xml snippet looks like this:
   <parallel>
       <java ... />                        <!-- start a test server -->
       <irongrid module="monitor" ... />   <!-- run our task against it -->
   </parallel>

Where <irongrid> is my task.  Here is the ant output:

task:
 [parallel] Set Dynamic attribute module=monitor
 [parallel] java.lang.Exception: Stack trace
 [parallel] 	at java.lang.Thread.dumpStack(Thread.java:1071)
 [parallel] 	at com.irongrid.ant.IronGridTask.setDynamicAttribute(IronGridTask.java:74)
 [parallel] 	at org.apache.tools.ant.IntrospectionHelper.setAttribute(IntrospectionHelper.java:415)
 [parallel] 	at org.apache.tools.ant.ProjectHelper.configure(ProjectHelper.java:306)
 [parallel] 	at org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:242)
 [parallel] 	at org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:211)
 [parallel] 	at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:124)
 [parallel] 	at org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:260)
 [parallel] 	at org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:211)
 [parallel] 	at org.apache.tools.ant.Task.maybeConfigure(Task.java:259)
 [parallel] 	at org.apache.tools.ant.Task.perform(Task.java:340)
 [parallel] 	at org.apache.tools.ant.Target.execute(Target.java:309)
 [parallel] 	at org.apache.tools.ant.Target.performTasks(Target.java:336)
 [parallel] 	at org.apache.tools.ant.Project.executeTarget(Project.java:1339) [parallel] 
at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
 [parallel] 	at org.apache.tools.ant.Main.runBuild(Main.java:609)
 [parallel] 	at org.apache.tools.ant.Main.start(Main.java:196)
 [parallel] 	at org.apache.tools.ant.Main.main(Main.java:235)
 [irongrid] Set Dynamic attribute module=monitor
 [irongrid] java.lang.Exception: Stack trace
 [irongrid] 	at java.lang.Thread.dumpStack(Thread.java:1071)
 [irongrid] 	at com.irongrid.ant.IronGridTask.setDynamicAttribute(IronGridTask.java:74)
 [irongrid] 	at org.apache.tools.ant.IntrospectionHelper.setAttribute(IntrospectionHelper.java:415)
 [irongrid] 	at org.apache.tools.ant.ProjectHelper.configure(ProjectHelper.java:306)
 [irongrid] 	at org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:242)
 [irongrid] 	at org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:211)
 [irongrid] 	at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:124)
 [irongrid] 	at org.apache.tools.ant.Task.perform(Task.java:340)
 [irongrid] 	at org.apache.tools.ant.taskdefs.Parallel$TaskThread.run(Parallel.java:177)
 [irongrid] Set Dynamic attribute server=devlinux
 [irongrid] Set Dynamic attribute port=2000
 [irongrid] Set Dynamic attribute delay=1000
     [java] Starting IronGrid Task Test Server...
 yada yada...

You can see I get called twice.  Once with the taskname being [parallel] and once with it
being my name, [irongrid].

Is this a bug, or am I supposed to be doing something with maybeCofigure()?  Thanks for your
help!

(sending this from a freakin Exchange web-client, hope it doesnt screw up!)

Brett Wooldridge
IronGrid, Inc.


-----Original Message-----
From:	Stefan Bodewig [mailto:bodewig@apache.org]
Sent:	Fri 3/21/2003 1:27 AM
To:	dev@ant.apache.org
Cc:	
Subject:	Re: Dynamic Configurator
On Thu, 20 Mar 2003, Brett Wooldridge <brett@irongrid.com> wrote:

> When I run ant, I see that createDynamicElement() gets
> called twice for the <junit> element, and further that
> setDynamicAttribute() gets called twice for someattr.

This certainly sounds like a bug.  We don't call the attribute setters
or nested creators/storers twice for "normal" elements either.

> 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.

I think it would, yes.

Stefan

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





Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message