ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <j_a_fernan...@yahoo.com>
Subject Re: [PATCH] PropertyCopy and Foreach (NEW OPTIONAL TASKS)
Date Thu, 27 Sep 2001 01:12:50 GMT
Well, then what you really are trying to do is templates which is part of the goals for ANT2.

In reality, ANT1 is not really designed to be used as templates. However, even in your case,
what we are talking here is having a two level build process:

1) A top level buildfile expressing the dependencies between modules.
2) One or more module-buildfiles for each module (depending whether you use template style
or not).

The only thing you modify when new projects arrive is the top level project (which is equivalent
to modify the property file on what you have now). The build will pick up from there. 

In any case, as I said real full support for this things is for ANT2. But whatever it is,
I think is is a mistake to encode dependency resolution by hand, instead of allowing ANT to
do the job. Remember, there is no reason why ANT in the future will not be able to execute
independent targets in parallel. Which translate on being able to build independent modules
in parallel. If the dependencies are correctly specified it should make no difference but
improve execution time.

Jose Alberto

----- Original Message ----- 
From: "Alejandro Abdelnur" <alejandro.abdelnur@sun.com>
To: <ant-dev@jakarta.apache.org>
Sent: Thursday, September 27, 2001 1:53 AM
Subject: Re: [PATCH] PropertyCopy and Foreach (NEW OPTIONAL TASKS)


> 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" <alejandro.abdelnur@sun.com>
> >
> > > 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
> 


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


Mime
View raw message