ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Alberto Fernandez <>
Subject Re: ant bug or user error?
Date Wed, 27 Mar 2002 11:28:49 GMT
 --- Stefan Bodewig <> wrote: > On
Tue, 26 Mar 2002, Paul Kilroy
> <> wrote:
> > I think the is related to the fact that ant caches
> > targets (and their tasks), but the task is
> "cleaned
> > up" at the end of the execute method. This pretty
> much
> > invalidates the cache for the target.
> Yes.

I just hit this problem myself, when trying to 
force some different evaluation order of the targets.

This is really a bad bug.

> > -Don't run the target again, it's already been
> run.
> or alternatively, don't use cached tasks.
> We've always said that "ant foo moo" is supposed to
> be the same as
> "ant foo; ant moo" which it obviously is not.

The problem here is that properties and IDs will be
reevaluated and I am not sure what that would do for
backward compatibility.

What I would like to do is to add a new command-line
option (and acompaning magic property) called "-once"
what this would do is treat the list of targets in the
command line as follows:

  ant -once t1 t2 t3 t4

executes a synthetic target "-once" defined as:

  <target name="-once" depends="t1, t2, t3, t4"/>

this should be quite easy to do, I think, and would
solve this issue to those who need it. The same
behaviour should work for:

  <ant target="t1, t2, t3" ... />

which would be a nice enhancement for this task.


Jose Alberto

Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts

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

View raw message