You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Russ Freeman <Ru...@divine.com> on 2001/11/08 10:45:13 UTC
Java components, global properties and antcall
I've done quite a bit of searching so far but not found a definition answer
so I will post here...
(I am using 1.3 until I have good reason to move to 1.4.)
I have adopted an approach where each of my java components has its own
build script and the end result of the build is the java code jar'd up and
ready for use by an application assembly or another component compile.
Of course these components may depend on other components and this entails
using <antcall> to call these sub-component build scripts via a "depends"
relationship.
This is all fine apart from the fact that property definitions are global.
When the sub build is called the properties in the calling script override
the properties in the called script. Thus the called script is broken
because it has property definitions called the same.
Now I've noticed in 1.4 you can set a doNotInherit flag on the antcall which
I assume will fix the problem. Is this the reason why this feature was added
to 1.4 or am I doing something basically wrong?
I'm surprised other people haven't had this problem. As an aside, I think
global properties are very dangerous in the same way globals in a program
are.
Russ Freeman
divine
Delta 603, Swindon, UK, SN5 7XF
Tel: +44 (0) 1793 509 117
mailto:russell.freeman@divine.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Java components, global properties and antcall
Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 8 Nov 2001, Russ Freeman <Ru...@divine.com> wrote:
> (I am using 1.3 until I have good reason to move to 1.4.)
>
> Now I've noticed in 1.4 you can set a doNotInherit flag on the
> antcall which I assume will fix the problem.
You mean inheritall="false" - looks as if you've found your reason to
upgrade 8-)
> Is this the reason why this feature was added to 1.4 or am I doing
> something basically wrong?
Exactly.
> I'm surprised other people haven't had this problem.
Many had.
Stefan
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>