ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Pearson <Al...@paramark.com>
Subject RE: How to run a target without ANTCALL?
Date Wed, 16 Jan 2002 19:39:32 GMT
Hello, Mark,
	I'm trying to write a build.xml file that has several
targets invoked by antcall (which themselves have depends),
and am running into the same issue which you described.  Your
<do> task sounds like a very nice solution.  I wonder if
you would be inclined to share the code with the ANT users 
community.  It would be quite helpful to me and I'm sure
many others.

	Thanks,

	Alan Pearson
	Software Design Engineer
	Paramark, Inc.  (http://www.paramark.com/)


> -----Original Message-----
> From: Mark McMillan [mailto:mark.mcmillan@engineous.com]
> Sent: Monday, December 17, 2001 4: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 with 
> many targets (some of which invoke each other via ANTCALL) 
> always evaluate 
> common dependencies more than once.  It takes a lot of 
> tedious code to 
> control it with "unless" clauses and setting properties to 
> prevent multiple 
> executions.
> 
> So I wrote a simple task of my own called "do" which will 
> invoke the named 
> 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 of 
> our large project when running high level targets (e.g. 
> targets that call 
> lots of sub-targets).
> 
> Seems like this should be a built-in ANT function...?
> 
> -Mark
> 
> At 01:01 PM 12/14/01, you wrote:
> >--- Mark McMillan <mark.mcmillan@engineous.com> 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 
> re-evaluates
> > > 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 be
> > > executed more than once.  Is there some way to invoke a 
> target without
> > > using ANTCALL (or, some way to prevent re-evaluation of 
> dependants in
> > > 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 thing
> >that jumps to mind is to have your "init" target (if that's 
> the only one
> >you're concerned about) set an (eg.) init.done property, 
> then include an
> >unless="init.done" for the "init" target.
> >
> >Diane
> >
> >=====
> >(holtdl@yahoo.com)
> >
> >
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Check out Yahoo! Shopping and Yahoo! Auctions for all of
> >your unique holiday gifts! Buy at http://shopping.yahoo.com
> >or bid at http://auctions.yahoo.com
> >
> >--
> >To unsubscribe, e-mail:   
<mailto:ant-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message