ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alejandro Abdelnur <>
Subject Re: [PATCH] PropertyCopy and Foreach (NEW OPTIONAL TASKS)
Date Thu, 27 Sep 2001 00:53:27 GMT
jose alberto,

i do not understand why you say " using some order list that no one really knows why
that order and not another...", i think this is purely matter of documentation.

i understand that using the depends attribute on targets makes ant (not the developer) to
flatten the dependency graph into a sequence.

the thing is that that requires changes to the build files. the approach i took was to have
generic build xml files (usable by different projects) and the specific of the project/developers
be in properties files.

by doing this the build files can be leveraged across projects.



Jose Alberto Fernandez wrote:

> From: "Alejandro Abdelnur" <>
> > craeg,
> >
> > > Can you give an example where you would need an ordered collection,
> > > rather than a set?
> >
> > yes i can.
> >
> > i've built a development environment based on ant for a big project (35K source
files - java, html, jsp, xml, etc.), it takes
> > care of building (compiling), deploying (token replacement) and installing (copying
stuff to the right place). the project is
> > divided in several functional modules that evolve at their own speed, each module
has a set of source files. this functional
> > modules create a non cyclical graph of dependencies for the building process, i.e.:
to build module C you need module B
> > already built, and for building B you need A built first. the master build file
goes over all the modules in the
> > *defined* order building them.
> >
> > if the order is not enforced the build fails.
> >
> This is exactly the kind of misuse of foreach that keeps people rejecting its formal
> What you are doing is hiding the real dependencies between your different modules, by
using some order list that no one really knows why that order and not another. This to me
is bad.
> The whole point of ANT is making those dependencies explicit so that the build is maintainable,
so you should be using targets and dependdencies and let ANT pick the correct building order.
If at some point new modules are added with new dependencies, you just need to list them and
ANT will rearrage the building process as needed.
> IN any case, you were already citing all the modules by name in your order list, so there
is no diference here.
> Jose Alberto
> _________________________________________________________
> Do You Yahoo!?
> Get your free address at

View raw message