ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <>
Subject Re: [PATCH] PropertyCopy and Foreach (NEW OPTIONAL TASKS)
Date Thu, 27 Sep 2001 00:11:35 GMT
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 introduction.
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