You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by martin sweitzer <ms...@gmail.com> on 2006/12/22 21:47:17 UTC
target timeout
Is there a way to have a timeout associated with a <target>?
I would like to put an upper bound on the time a target can run. I
know I can probably go through and set each exec function to have a
timeout but for some tasks (depending on what people checked in) it is
pretty variable.
Being able to set this target should go longer than 12 hours would be
really nice.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: target timeout
Posted by martin sweitzer <ms...@gmail.com>.
On 1/5/07, Rebhan, Gilbert <Gi...@huk-coburg.de> wrote:
>
> Hi,
>
> can you give a short snippet to illustrate your problem ?
>
> i use limit like that and it works fine =
>
> <limit maxwait ...>
>
> put all my stuff that should be killed
> if not in time, f.e.
>
> <target name=foo">
> ...
> </target>
>
> <target name="bar">
> ...
> </target>
>
> </limit >
>
> if there are any sideeffects with your targets and antcall
> it's not a problem with the limit task itself.
>
my usages looks like the following:
<target name="buildIt >
<limit hours="1" failonerror="true">
<antcall target="a" />
<antcall target="b" />
<antcall target="c" />
<antcall target="d" />
<antcall target="e" />
<antcall target="f" />
</limit>
</target>
<target name="e" depends="d"></target>
In the above, d seems to get called twice.
If I do:
<limit hours="1" failonerror="true">
<target name="buildIt2" >
</target>
</limit>
That gives me an error:
Could not create task or typeof type: target.
Ant could not find the task or a class this task relies upon.
if I do:
<target name="buildIt" >
<limit hours="1" failonerror="true">
<target name="buildIt2" >
<echo message = "hi! buildIt2 here" />
</target>
</limit>
</target>
Then that parses correctly, but if you try to call target: buildIt
you will get:
Could not create task or typeof type: target.
Ant could not find the task or a class this task relies upon.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: target timeout
Posted by "Rebhan, Gilbert" <Gi...@huk-coburg.de>.
Hi,
can you give a short snippet to illustrate your problem ?
i use limit like that and it works fine =
<limit maxwait ...>
put all my stuff that should be killed
if not in time, f.e.
<target name=foo">
...
</target>
<target name="bar">
...
</target>
</limit >
if there are any sideeffects with your targets and antcall
it's not a problem with the limit task itself.
Regards, Gilbert
-----Original Message-----
From: martin sweitzer [mailto:msewlists@gmail.com]
Sent: Thursday, January 04, 2007 11:04 PM
To: Ant Users List
Subject: Re: target timeout
On 12/22/06, martin sweitzer <ms...@gmail.com> wrote:
> On 12/22/06, Gilbert Rebhan <an...@schillbaer.de> wrote:
> > Hi,
> >
> > martin sweitzer wrote:
> > > Is there a way to have a timeout associated with a <target>?
> > > I would like to put an upper bound on the time a target can run.
I
> >
> > you can go with the <limit> task from antcontrib
> >
> > see = http://ant-contrib.sourceforge.net/tasks/tasks/limit_task.html
> >
>
> Ahh sweet! Just another layer of indirection and we are styling once
more! :-)
>
Well one side effect is that you need to manually make certain the
depends="" are not duplicated. Otherwise you get multiple calls to
that target from your antcalls :-(
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: target timeout
Posted by martin sweitzer <ms...@gmail.com>.
On 12/22/06, martin sweitzer <ms...@gmail.com> wrote:
> On 12/22/06, Gilbert Rebhan <an...@schillbaer.de> wrote:
> > Hi,
> >
> > martin sweitzer wrote:
> > > Is there a way to have a timeout associated with a <target>?
> > > I would like to put an upper bound on the time a target can run. I
> >
> > you can go with the <limit> task from antcontrib
> >
> > see = http://ant-contrib.sourceforge.net/tasks/tasks/limit_task.html
> >
>
> Ahh sweet! Just another layer of indirection and we are styling once more! :-)
>
Well one side effect is that you need to manually make certain the
depends="" are not duplicated. Otherwise you get multiple calls to
that target from your antcalls :-(
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: target timeout
Posted by martin sweitzer <ms...@gmail.com>.
On 12/22/06, Gilbert Rebhan <an...@schillbaer.de> wrote:
> Hi,
>
> martin sweitzer wrote:
> > Is there a way to have a timeout associated with a <target>?
> > I would like to put an upper bound on the time a target can run. I
>
> you can go with the <limit> task from antcontrib
>
> see = http://ant-contrib.sourceforge.net/tasks/tasks/limit_task.html
>
Ahh sweet! Just another layer of indirection and we are styling once more! :-)
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: target timeout
Posted by Gilbert Rebhan <an...@schillbaer.de>.
Hi,
martin sweitzer wrote:
> Is there a way to have a timeout associated with a <target>?
> I would like to put an upper bound on the time a target can run. I
you can go with the <limit> task from antcontrib
see = http://ant-contrib.sourceforge.net/tasks/tasks/limit_task.html
Regards, Gilbert
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org