ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scot P. Floess" <flo...@mindspring.com>
Subject Re: "Recursiveness" / property already used in a "generic" build...
Date Thu, 15 Jun 2006 11:19:42 GMT
Greg:

Just curious...how are you calling these sub project build.xml's from 
the parent?  Are you using <ant> task?  If so, probably want to do <ant 
inheritAll = "false".../>

Greg Irvine wrote:
> Hi all.
>
>  
>
> I'm trying to write a generic build file that uses a properties file to
> inform the generic build file of which subprojects to build. 
>
>  
>
> So, the build.xml loads a build.properties which has a property buildorder
> which is a list of subprojects in that directory to build, and this order is
> specific due to dependencies.
>
>  
>
> I have this working just fine (generally).
>
>  
>
> This works if multiple folders have the same level do the same thing.  I'm
> assuming this works because once the explicit call to build Folder1 returns,
> any properties set in Folder1 or lower are cleared, so when Folder2 build
> loads the build.properties the buildorder property set in Folder1 has been
> cleared.
>
>  
>
> Parent -> Build.xml explicitly calls build on Folder1 and Folder2
>
>           Folder1 -> build.xml + build.properties (buildorder=SubFolder1,
> SubFolder2, SubFolder3)
>
>                       -> SubFolder1
>
>                       -> SubFolder2
>
>                       -> SubFolder3
>
>           Folder2-> build.xml + build.properties (buildorder=SubFolder1,
> SubFolder2, SubFolder3)
>
>                       -> SubFolder1
>
>                       -> SubFolder2
>
>                       -> SubFolder3
>
>  
>
> The problem I have is that if one of those projects is in fact a folder that
> itself has a list of projects to build I find the property buildorder is
> already set by the parent build file and fails trying to build the same
> stuff again but in the subfolder.
>
>           Folder1 -> build.xml + build.properties (buildorder=SubFolder1,
> SubFolder2, SubFolder3)
>
>                       -> SubFolder1 -> build.xml + build.properties
> (buildorder=SubSubFolder1, SubSubFolder2, SubSubFolder3)
>
>                                       -> SubSubFolder1
>
>                                       -> SubSubFolder2
>
>                                       -> SubSubFolder3
>
>                       -> SubFolder2
>
>                       -> SubFolder3
>
>  
>
> i.e. Folder1 build loads buildorder from build.properties and calls
> build.xml in SubFolder1 (as specific in build.properties) which tries to
> load it's build.properties which tries to define buildorder and of course
> can't.
>
> Hence, the build in SubFolder1 tries to build SubFolder1, SubFolder2,
> SubFolder3 as defined by the parent buildorder again instead of the "new"
> SubSubFolder1.
>
>  
>
> Any suggestions on how to get around this would be great.
>
>  
>
> Thanks and regards,
>
>  
>
> Greg.
>
>  
>
> Ps. If you REALLY think Maven is a better option let me know and I'll just
> have to do an ROI analysis.
>
>
>   

-- 
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate  http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim


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


Mime
View raw message