On Mon, 13 Dec 2004, Yves Martin <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]