ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject RE: Info about Antidote
Date Tue, 30 Jan 2001 02:46:10 GMT
At 08:07  29/1/01 -0600, Simeon H.K. Fitch wrote:
>> This is probably naive but could someone lay out the rationale
>> for why tasks
>> where implemented as:
>>
>>    <myTask ... />
>>
>> instead of
>>
>>    <task name="myTask" ... />
>> ?
>>
>
>I echo this question as well. Any of the Ant developers want to shed some
>light on this? Has any consideration been given to changing the input file
>approach for Ant 2 (including some of the current "optionals" in the DTD for
>backward compatibility)?

I actually had a discussion about this on Avalon list a month or two ago.
The second approach is much easier to validate, much easier to manipulate
programatically and in general much easier for ant implementors and any GUI
that could provide a frontend for it. 

The first approach (we termed it the "scripty-way") however is easier when
you are hand-crafting build files and is much easier to eye-validate and
much shorter build files. 

Consider the case

<task name="javac" ... >
  <param name="compiler" value="..." />
  <param name="classpath">
    <param name="dir" value="..." />
  </param>
</task>

VS

<javac compiler="..." > 
  <classpath dir="..." />
</javac>

The first is much easier for computers and programmers while the second is
easier for mere mortals. We discussed the idea of using XSLT to transform
from approach 2 to approach 1 which was interesting but nothing ever really
happened with it.

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Mime
View raw message