ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David McTavish <dmctav...@SANDVINE.com>
Subject RE: how many build.xml files and where should they go?
Date Mon, 07 Apr 2003 20:03:07 GMT
I apologize. I think Dominique's advice that you use a single build.xml file
is probably the best bet to start, and then extend upon that as your
development effort grows.  We currently have 6 on-going projects that
may/may not have dependencies between each other, and are basically managed
independently as far as development is concerned. Each of these have a
separate source directory and are managed in CVS differently, and thus, have
a different build script to manage each. 

Dominique's advice is perfect if you are just starting out a new project and
are trying to get a reliable build environment off the ground. The problem
arises when you have multiple projects that require management, etc. and in
this case, you'll begin to notice an unwritten requirement that the build
files be somewhat separated.  I usually like to have one build.xml per
source tree (where the source tree will then split to contain production
code and test code in separate branches). A nice side-effect is that it also
makes it a little more appealing for a developer to look at the build.xml
file and understand it when they are dealing with a 300 line xml file
instead of a massive single file with every project included. 

The only thing I can suggest is look at the targets you do add, and refactor
as much as possible. Eventually, when you do split to multiple build scripts
(if you inherit more projects, etc.), it will be easier in the long run.
This in conjunction with using build.properties files will probably would be
my two biggest recommendations.

d.




-----Original Message-----
From: Tim Singletary [mailto:tsingle@vetinsite.com]
Sent: Monday, April 07, 2003 3:53 PM
To: Ant Users List
Subject: RE: how many build.xml files and where should they go?


 > The canonical setup of an Ant build for a decent size Java project is a
 > single build.xml at the root of the project. A simple rule of thumb is
that
 > you should have one build file per src/ directory (containing production

I don't understand.  First 'a single build.xml', then 'one build file
per src/ directory'.  Perhaps you're suggesting that a project be
decomposed into subprojects and that each subproject should have its
own src directory and build.xml?

tim



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

Mime
View raw message