You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Thomas Christen <ch...@active.ch> on 2000/11/18 17:31:18 UTC

Nested Tasks

As mentioned earlier, I wrote a new task called wait. This task would wait
for a defined period of time and then continue. My next step is now to
enhance the task available in way that it if the expected resource is not
available it should try it after a while and retry for a maximum period of
time (like wait would).

At first I thought, I should add the necessary attributes and implement a
similar functionality as implemented in wait. But now I'm thinking a nested
approach would be clearer like :

<wait for="60000">
	<available file="foo.txt" property="foo.available"/>
</wait>

even more than one resources or even other tasks could be put inside this
wait (e.g. retry if a task failed).

I could imagine the same concept for my earlier proposed "paralell"
option. I could implement it the same way like

<paralell>
	<javac ....>
	<javac .....>
</paralell>

The disadvantage is, a concept like this would open the
posibility to become mor a script like tool, witch I expect
is not what most of you want ....

Another problem I have is, I would need to expand the mechnism
inside IntrospectionHelper and allow to identify a methode
void add(Task task) as a general interface to add a nested task
to a task.

Shall I procede ?

Tomy


RE: Nested Tasks

Posted by Thomas Christen <ch...@active.ch>.
> Stefan Bodewig <bo...@apache.org> wrote:
>
> Maybe we should keep something like this in mind when we are coming
> together to decide on the Ant 2.0 structure, I wouldn't want to invent
> and implement a new concept that might be obsoleted soon thereafter.

I see this point. My (personal) problem is, I can't wait too long.

Today I have tested the part for nested Tasks and it worked. Was even
easier than I thought it would be. Hope that I can post the new
functionality
by next week. Then You and the community can decide whether they like it or
not or if have to change things a little bit.

Tomy



Re: Nested Tasks

Posted by Stefan Bodewig <bo...@apache.org>.
Thomas Christen <ch...@active.ch> wrote:

> I'm thinking a nested approach would be clearer like :
> 
> <wait for="60000">
> 	<available file="foo.txt" property="foo.available"/>
> </wait>
> 
> even more than one resources or even other tasks could be put inside
> this wait (e.g. retry if a task failed).

I'm not sure what others think, to me something like this is not
totally out of scope, even though it opens the door to
scripting. Whatever version of scripting could result out of this, the
complexity would be in the tasks one had to write, not inside Ant's
core.

Maybe we should keep something like this in mind when we are coming
together to decide on the Ant 2.0 structure, I wouldn't want to invent
and implement a new concept that might be obsoleted soon thereafter.

Stefan