ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <>
Subject Re: [Fwd: ANT]
Date Wed, 08 Dec 2004 15:04:33 GMT
I think that you are correct in the nested elements should be 
reconfigured as well -i.e. it is a bug not
to do this.

However the patch you provide has the following minor issues:

1) the diff should be done using context diff (diff -c command), 
otherwise it is difficult to apply.

2) You should change the current CVS source and not the released source 
(1.6.2 in this case). This is
    for a number of reasons - a) it makes sure that the change works 
against the latest version of ant, b)
    it is easier for ant committers to commit it, c) the fix may already 
be in cvs (this has happened on a number
    of occasions).

3) all public methods need a javadoc comment (including javadoc tags for 
each of the method parameters,
     return values and exceptions)

4) where possible a unit test (a build file would suffice) should be 
provided to show the fix or enhancement (maybe not easy in this case)


Michael Augustin wrote:

> Hi all,
> in a project we use ant as a workflow-engine. The difference to the 
> normal use as a buildtool is, that target (workflows) are executed as 
> often as the user requests and the ant-application runs over long 
> time. That makes it necessarry that ant-variables (properties) are 
> evaluated mroe than just on time.
> So each time a target is executed I call reconfigure previously for 
> each task/runtimeconfigurable-object. The change in the attachted 
> files delegate the reconfigure-call also to the children-xml-elements 
> (also RuntimeConfigurable-Objects).
> Now the bad news: If you have child-elements in your ant-tasks, that 
> are no tasks (means: your task is not an task-container, but you use 
> child-elements and implements methods like addConfiguredChild(Child c) 
> ) . The addConfiguredChild or wathever method you implemented for your 
> child-element is called as often as reconfigure is called on the task 
> in a target. So you have to pay attention on clearing the list of your 
> child-object after perform was called. For myself I implemented a 
> method clearForReconfigure that is called for each of my tasks.
> So I would like to get a feedback for this change (see attached diff) 
> and the idea to use ant as workflowengine.
>>       throws BuildException
>>    {
>>       maybeConfigure(p, configureChildren, false);
>>    }
>>    public void maybeConfigure(Project p, boolean configureChildren, boolean reconfigure)
><                 child.maybeConfigure(p);
>>                // Michael Augustin, 2004-10-20
>>                // call reconfigure also for children
>>                if (reconfigure == true)
>>                    child.reconfigure(p);
>>                else
>>                    child.maybeConfigure(p);
><         maybeConfigure(p);
>>        // 2004-10-20 ,Michael Augustin
>>        // call reconfigure also for children
>>        maybeConfigure(p, true, true);
>To unsubscribe, e-mail:
>For additional commands, e-mail:

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

View raw message