ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Alberto Fernandez <>
Subject RE: reassigning property values?
Date Fri, 27 Oct 2000 21:26:21 GMT
> From: Charles Tewksbury []
> To start with, I having been having a heck of a time with 
> properties lately.
> I don't know why but all my build files just seemed to go in 
> the toilet when
> I upgraded to 1.2 (I doubt I was doing them correctly to 
> start with but...)
> Is anybody else experiencing upgrade nightmares?
> Now to Jose's statement.  I agree almost completely, 
> especially that you
> cannot guarantee a BUILD ALL means all subprojects are designed to a
> cohesive whole.
> I do wish to expand a bit more with my own frustrations 
> (Don't get me wrong,
> for the most part I love ANT).  In my projects I build 
> numerous subprojects
> (>10) (which I differentiate by groups working on the project 
> so they can
> maintain their sub-project build files and I just do the 
> integrations).  In
> these subprojects there are many interdependencies.  For 
> example (does not
> reflect reality too closely):
> 	Mod A depends on C
> 	Mod B depends on C
> 	Mod C depends on B
> 	Mod D depends on A
> This works great when building any submodule but when I BUILD 
> ALL, I could
> end up building
>  	Build A:	B, C, A
> 	Build B:	(No build but trying B, C, B, C, B, C, .....)
> 	Build C:	(No build but trying B, C, B, C, B, C, .....)
> 	Build D:	C, A, D
> I know the interdependencies may seem strange but they are 
> true.  To stop
> the "circular" builds of B and C, I have to tell them through 
> a "nosubmod"
> prop not to build if already built.  I originally wanted to do this by
> passing a property back up the build chain but apparently I 
> am unable to do
> this.  Therefore, I end up doing some funky behavior in my 
> build all script
> where I personally understand the dependencies.  (Although I 
> hate it, this
> is one benefit of GMake).
> I liked the concept of a target getting executed once and 
> only once, except
> this doesn't work between multiple build files (or antcalls for that
> matter).
> Now I realize that no one knows my exact structure, but I 
> assume others have
> similar problems, I would be interested in hearing how you 
> solved them.

Well, I have had "kind" of a similar situation when using <antcall>
What I would suggest is removing the inter subproject dependencies
from the subprojects themselves and  put them on the integration project.

You will have targets "a", "b", ... and "all" in the integration project
and those are the targets everyone uses. Those targets will have the
dependency relationships an call the corresponding build file
maintained by each group.

<target name="all" depends="a,b,c,d" />
<target name="a" depends="c" >
  <ant target="modA" .... />

<target name="b" depends="c" >
  <ant target="modB" .... />

<target name="c" depends="b" >
  <ant target="modC" .... />

<target name="d" depends="d" >
  <ant target="modD" .... />

Here, it is your work as integrator to maintain the modules

Now, I have to say, I do not know how happy ANT is about having circular
dependencies, you may get warnings or worst. If the circularity
can be break when looking at components of each subproject, then you can
solve it
at this level where you have the big picture.

Jose Alberto

View raw message