ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roger Vaughn <>
Subject Re: Suggestion: Dynamic or Default Target
Date Wed, 22 Nov 2000 02:37:39 GMT
Peter Donald wrote:<br>
<blockquote type="cite" cite=""><pre
wrap="">At 02:21  21/11/00 -0500, you wrote:<br></pre>
  <blockquote type="cite"><pre wrap="">Here's a suggestion for a new feature in
Ant.  I would like to see the <br>capability for a "default" or dynamic target in Ant.
 What this would do is <br>catch all target invocations (or target invocations based
on a pattern)<br></pre></blockquote>
    <pre wrap="">This has been suggested a number of times before ;) However I don't
like it<br>and I think the general consensus is that it is too complex. If you are<br>going
to do that you may end up doing regular expression matches in<br>depends/target matching.
This increases the complexity too much for little<br>gain. "The road to make is paved
with good intentions" ;)<br><br>Instead you can "preprocess" ant files (via xslt/css/other)
to do all the<br>morphing of build till it matches ant specs. Hopefully the next version
of<br>ant will allow you to run special preprocessors that allow you to do all<br>sorts
of things</pre>
    <blockquote type="cite" cite=""><pre
Actually, I have been preprocessing my Ant files - I even use a tiny make
file to preprocess and kick off Ant.&nbsp; ;-)&nbsp; And since I finally learned how
to merge XML files using XSLT (document() is a great thing...), I'm even
more dangerous.&nbsp; This works great, except that make doesn't support dynamic
targets either (though I can get there by playing games with Gnu make....isn't
this why Ant was started in the first place?)&nbsp; :-)<br>
This suggestion comes from a desire to try to do things in "pure ant" as
most of the project leads seem to prefer.&nbsp; I can certainly get by without
BTW, I agree that pattern targets would likely be complicated.&nbsp; Just for
kicks, though, I prototyped the "catch all" or "default" target this afternoon.&nbsp;
(No pattern matching is involved - it simply catches all unmatched target
invocations.)&nbsp; With just a handful of lines added to Project, ProjectHelper,
and Target, it works like a charm.&nbsp; I'd be happy to send the patch if anyone
wants to review it.<br>

View raw message