ant-user mailing list archives

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

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}"/>
</target>

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.

Don

-----Original Message-----
From: Leo [mailto:leonardo5789@yahoo.com]
Sent: Thursday, March 07, 2002 5:15 PM
To: ant-user@jakarta.apache.org
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
files.

I appreciate your comments.

Leo



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

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


Mime
View raw message