You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Tim Gordon <ti...@allustra.com> on 2003/04/02 17:20:47 UTC

Usage of ant and antcall tasks

I've read things recently that state that usage of antcall should be
restricted to calling sections of your build.xml that can be parameterised
(Conor, I think).

That said, it implies that usage of the ant task should similarly be frowned
upon.

I'd love to say that one of the targets in my build.xml depends on a task
defined in another build.xml, but the only way open to me seems to be using
the ant task, which is programmatic, rather than declarative.

Is this the only way to specify dependencies on targets in other build.xml
files at the momement? Will we have to wait for Ant2 for this sort of thing?

Tim Gordon

Allustra Limited
1 Royal Exchange Avenue
London
EC3V 3LT
Tel 020 7464 4190
Tel 020 7464 4194
http://www.allustra.com/


Re: Usage of ant and antcall tasks

Posted by Matt Benson <gu...@yahoo.com>.
I personally consider this to be exactly what
<antcall> is good (and proper) for.

But what do I know?

-Matt

--- Steve Loughran <st...@iseran.com> wrote:
> Tim Gordon wrote:
> > I've read things recently that state that usage of
> antcall should be
> > restricted to calling sections of your build.xml
> that can be parameterised
> > (Conor, I think).
> > 
> > That said, it implies that usage of the ant task
> should similarly be frowned
> > upon.
> > 
> > I'd love to say that one of the targets in my
> build.xml depends on a task
> > defined in another build.xml, but the only way
> open to me seems to be using
> > the ant task, which is programmatic, rather than
> declarative.
> > 
> > Is this the only way to specify dependencies on
> targets in other build.xml
> > files at the momement? Will we have to wait for
> Ant2 for this sort of thing?
> 
> The way I do it is have a master build file that
> contains the dependency 
> logic 'server depends on common and core Jars',
> client depends on 
> server'; each of these is encapsulated into its own
> target that then 
> <ant>s down to the appropriate dir. This lets me
> invoke things like 
> 'dist' and 'test' across the board.
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com

Re: Usage of ant and antcall tasks

Posted by Steve Loughran <st...@iseran.com>.
Tim Gordon wrote:
> I've read things recently that state that usage of antcall should be
> restricted to calling sections of your build.xml that can be parameterised
> (Conor, I think).
> 
> That said, it implies that usage of the ant task should similarly be frowned
> upon.
> 
> I'd love to say that one of the targets in my build.xml depends on a task
> defined in another build.xml, but the only way open to me seems to be using
> the ant task, which is programmatic, rather than declarative.
> 
> Is this the only way to specify dependencies on targets in other build.xml
> files at the momement? Will we have to wait for Ant2 for this sort of thing?

The way I do it is have a master build file that contains the dependency 
logic 'server depends on common and core Jars', client depends on 
server'; each of these is encapsulated into its own target that then 
<ant>s down to the appropriate dir. This lets me invoke things like 
'dist' and 'test' across the board.