ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: Ant templates and more templates
Date Thu, 05 Oct 2000 13:30:08 GMT
>Writing some build files for our projects here I have come across several 
>situations in which I would have liked having some sort of template
facilities 
>for ANT.

yep - me too ;)
  
>(1) This first is for tasks. The <java> tasks that I use are quite quite 
>monotonous: Call this class with this arguments, then call it again but just 
>change the last arguments, etc, etc.

>One way to deal with this is to define my own task that extends <java> and 
>that presets all that needs to be preset. But wouldn't it be nice to have a 
>way to say tell ANT to do that without a need to declare and maintain new 
>classes?

This has been proposed a few times before but no one has like it. It makes
ant just another make with fewer warts. Ideally a frontend that passed SAX
events/stream to ant and manipulated it via xslt/css/some other scripting
language etc would work
  
>(2) A second situation where templates are interesting is when trying to 
>interconnect tasks from on build file to another using the <ant> task. In
this 
>case one usially want to have access from the marter build file to the 
>suordinate build files. Usually one would have <target>s like:

Looks like a case for script task

>Does this looks as something interesting to have? I think the approach is 
>quite declarative in both cases, does anybody see a major problem with this?

well despite it's good points it will unlikely to be accepted into core as
it is non-intuitive, complex etc and leads to buildfiles which have to have
more info to interpret. I would love to see a frontend thou

Cheers,

Pete

*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |
*------------------------------------------------------*

Mime
View raw message