ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <jalbe...@cellectivity.com>
Subject RE: Internal AntCall and references
Date Wed, 15 Dec 2004 10:34:32 GMT
Isn't there a task in Ant-contrib that allows returning values from the
sub-build to the main?
Can't remember its name.

Jose Alberto

> -----Original Message-----
> From: Stefan Bodewig [mailto:bodewig@apache.org] 
> Sent: 15 December 2004 08:10
> To: dev@ant.apache.org
> Subject: Re: Internal AntCall and references
> 
> 
> On Mon, 13 Dec 2004, Yves Martin <yves.martin@elca.ch> wrote:
> 
> >  To clean it, I decided to use project references but it does not  
> > work with 'antcall':
> 
> This is because you set the reference in a different Project 
> instance than you try to read it in.
> 
> >  target A
> >    antcall B
> >    MyTask{getReference X}
> > 
> >  target B
> >    MyTask{setReference X}
> > 
> >  Is there a better way to implement a global storage ?
> 
> Option (1) don't use antcall at all.
> 
> Option (2) use a Map as your global storage and set this one 
> as reference before invoking antcall (with inheritrefs=true) 
> and have MyTask not set the reference in the project, but add 
> it to your global storage.
> 
> This also requires you Map to be not Cloneable since 
> otherwise B will only see a copy of your global storage and 
> be unable to write to it. Ant tries its best to make it hard 
> for "subbuilds" to affect their "parent build".
> 
> Stefan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message