ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roger Vaughn <>
Subject Re: Configure->Template->Build
Date Wed, 06 Jun 2001 13:23:53 GMT
--- Peter Donald <> wrote:
> Not sure if this is sarcasm or not? Naturally you
> can solve it using
> dynamic templating. Much like you could write a
> webserver in perl or write
> a GUI in assembly. Use the right tools for the
> problem. The question, is
> dynamic templating the right tool?

The fallacy here is that you assume there is one
"right" way to write Ant scripts.  What works for you
may not be right for others, and vice versa.  In some
circles, any solution, no matter how ugly, is the
right one (I'm not one of these :-)).  We need to
recognize that people think different ways, solve
problems different ways, and will run into build
scenarios that this team, I, or anyone else on the
list cannot anticipate.   (Hmmm, ant-icipate.  An Ant
preprocessor?  Sorry, couldn't help it. ;-))

To my way of thinking, the discussion should not
center around whether templates (dynamic or static)
are "the right thing to do", but rather around how
they impact, positively or negatively, the Ant core
and therefore the structure and behavior of *all* Ant
scripts.  There is obviously demand (and therefore
need) for this type of functionality, so who are we to
say it is "wrong"?  If, however, implementing
templates would compromise the Ant core (once again,
the core code, *not* the "correctness" of scripts),
then it can be said that Ant will not support them.

It appears to me that <projectref> is a workable
solution.  Implemented as a task, it has very little
impact on the Ant core.  Now, I have to say I'm not
thrilled with the idea, because as Peter points out,
it does break out functionality into many separate
files.  (However, I fail to see how XSLT templating
and configurators don't also do the same.  Sure, you
can try to read the generated script, but it isn't fun
- at least not without reformatting it first.)  I
would prefer a templating solution that allows (not
forces) the build engineer to put everything in one
file.  However, since this would definitely have a big
impact on the Ant core, I would have to say that
<projectref> is probably the better idea.


Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!

View raw message