ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ron Coutts" <>
Subject RE: How to run a target without ANTCALL?
Date Mon, 17 Dec 2001 17:11:38 GMT
I've experienced the same problem as Mark.  Instead of a new task,
perhaps an attribute on the existing 'antcall' task specifying not to
reevaluate the dependencies is the way to go.  Is there some reason this
wasn't done, or is a matter of a feature that hasn't been widely
requested yet?


-----Original Message-----
From: Mark McMillan []
Sent: Monday, December 17, 2001 5:41 AM
To: Ant Users List
Subject: Re: How to run a target without ANTCALL?

None of the offered solutions is really clean... a complex build file
many targets (some of which invoke each other via ANTCALL) always
common dependencies more than once.  It takes a lot of tedious code to 
control it with "unless" clauses and setting properties to prevent

So I wrote a simple task of my own called "do" which will invoke the
target without losing the current dependencies.  So instead of writing:

   <antcall target="subtask">

I write:

   <do target="subtask">

This seems to work very well and results in significantly faster builds
our large project when running high level targets (e.g. targets that
lots of sub-targets).

Seems like this should be a built-in ANT function...?


At 01:01 PM 12/14/01, you wrote:
>--- Mark McMillan <> wrote:
> > At some point in a target I need to execute some other target in the
> > same project, but I don't want to use ANTCALL because it
> > all the dependant targets.  E.g. I have an "init" target that all
> > targets depend on.  If I use ANTCALL to invoke a target, "init" will
> > executed more than once.  Is there some way to invoke a target
> > using ANTCALL (or, some way to prevent re-evaluation of dependants
> > the call)?
>You can execute a target from <script> without it re-running dependent
>targets. If using <script> doesn't float your boat, the only other
>that jumps to mind is to have your "init" target (if that's the only
>you're concerned about) set an (eg.) init.done property, then include
>unless="init.done" for the "init" target.
>Do You Yahoo!?
>Check out Yahoo! Shopping and Yahoo! Auctions for all of
>your unique holiday gifts! Buy at
>or bid at
>To unsubscribe, e-mail:
>For additional commands, e-mail:

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

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

View raw message