ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: Suggestion: Dynamic or Default Target
Date Wed, 22 Nov 2000 01:14:38 GMT
At 02:21  21/11/00 -0500, you wrote:
>Here's a suggestion for a new feature in Ant.  I would like to see the 
>capability for a "default" or dynamic target in Ant.  What this would do is 
>catch all target invocations (or target invocations based on a pattern)
after 
>all explicit targets have been matched.  In other words, any targets which
now 
>error out for "target not found" would instead be caught and processed by
the 
>default target.

This has been suggested a number of times before ;) However I don't like it
and I think the general consensus is that it is too complex. If you are
going to do that you may end up doing regular expression matches in
depends/target matching. This increases the complexity too much for little
gain. "The road to make is paved with good intentions" ;)

Instead you can "preprocess" ant files (via xslt/css/other) to do all the
morphing of build till it matches ant specs. Hopefully the next version of
ant will allow you to run special preprocessors that allow you to do all
sorts of things.

>For those of you who will answer by saying I shouldn't be generating dynamic 
>scripts - I get the point, but some situations call for it, and believe me, 
>it's easier than teaching every developer on the project how to write their 
>own scripts.  (And better than having them spend expensive time on it...)

I agree that simplifying further is sometimes a desire in certain
situations but I don't think it should be at the expense of complexity in
ant. I think an extra pre-process stage may solve it for 90% of cases ?
Would that work for you ?

Cheers,

Pete

*------------------------------------------------------*
| Despite your efforts to be a romantic hero, you will |
| gradually evolve into a postmodern plot device.      |
*------------------------------------------------------*


Mime
View raw message