ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Mitchell <>
Subject RE: Single or Multiple build.xml files?
Date Fri, 08 Mar 2002 01:59:57 GMT

It depends on how complicated your system is.  You can start with one and as
things get more complicated refactor it.  I wouldn't use anything quite like
Makefiles, but you may want to have several ant files each with common
targets (like compile, jar, clean, etc).  That way you can have one main
build.xml that calls all of the other ones.  For instance:

<target name="makeComponent">
	<!-- set the "file" param before calling makeComponet -->
	<ant target="compile" antfile="${file}"/>
	<ant target="jar" antfile="${file}"/>
	<ant target="copyToDistDir" antfile="${file}"/>

The key is to keep all of the build.xml as similar as possible.  I also use
XML's document include feature to include common targets into each of my
component build files.


-----Original Message-----
From: Leo []
Sent: Thursday, March 07, 2002 5:15 PM
Subject: Single or Multiple build.xml files?

Hi All,

I am transitioning the scripts of a project to Ant. I have been wondering

whether a single file should be used or a hierarchy of build.xml files like

MakeFiles is the better option. The samples I have seen all use a single

and I wonder whether there is a disadvantage to using multiple build.xml

I appreciate your comments.


Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message