> From: Rob Walker [mailto:[EMAIL PROTECTED]
> >> Have you tried to distill down your builds to something simple
> >> enough that can be sent whole for troubleshooting?
> >
> In fact I didn't even get as far as this before I spotted it ...
> 
> In my top level build.xml, my "vt.class.path" reference has global
> scope, meaning I don't have to include an "inheritrefs=true" on any
> <antcall> tasks in my top level script.
> 
> In fact, the "vt.class.path" reference is also being passed down to my
> lower level build scripts in the <subant .... "inheritrefs=true" >
call
> - but with a subtle change, it doesn't appear in my sub-build file
with
> global scope. So top-level targets in this build script can use it
fine,
> but anywhere in my sub-build file that I have an <antcall> I have to
> include an "inheritrefs=true" to propagate it to any called target in
> the sub-build script.
> 
> So, I guess not strictly a bug, but possibly an inconsistency (or at
> least a slight "gotcha") that's worth documenting that inheritrefs
> _does_ pass references down to called script, but it alters their
scope.

If I followed correctly, it's not <subant> that alters scope, it's
<antcall> that opens a new scope. And since it does not inherit
references by default, the reference <subant> passed in correctly is
lost thru the use of <antcall>.

Are you sure you need <antcall>? Can't you refactor your 'function'
targets that you <antcall> into <macro>s? It's usually better/faster
with macros.

--DD

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to