Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@jakarta.apache.org Received: (qmail 42822 invoked by uid 500); 27 Sep 2001 00:53:43 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: ant-dev@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 42674 invoked from network); 27 Sep 2001 00:53:42 -0000 Message-ID: <3BB27887.AA8D9FEB@sun.com> Date: Wed, 26 Sep 2001 17:53:27 -0700 From: Alejandro Abdelnur Organization: Sun Microsystems, Inc X-Mailer: Mozilla 4.78 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: ant-dev@jakarta.apache.org Subject: Re: [PATCH] PropertyCopy and Foreach (NEW OPTIONAL TASKS) References: <1001095615.3208.262.camel@sawgrass.sedonageo.com><3BAB8500.3502B8F9@sun.com><1001100364.3209.287.camel@sawgrass.sedonageo.com> <1001425761.22367.27.camel@sawgrass.sedonageo.com> <002101c145cd$d9c3bae0$0100a8c0@jose> <3BB0AF7F.1090909@arielpartners.com> <3BB268EA.1732D23B@sun.com> <00ef01c146e8$f9795540$0100a8c0@jose> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N jose alberto, i do not understand why you say "...by 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. regards. a 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 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 @yahoo.com address at http://mail.yahoo.com