ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject RE: [VOTE] procedural versus purely declarative
Date Mon, 23 Apr 2001 01:16:50 GMT
At 04:51  22/4/01 +0100, Jose Alberto Fernandez wrote:
>> custom tasks will likely be created regardless in ant2 regardl4ess of
>> wishes of ant2 devs ;)
>>
>
>Back on the good old days of 1.1 I posted a <case> task that allowed setting
>properties based on the values of others. At the time it was dismissed
>because there were better magic bullets, but I keap it just in case :-)

ironically that type of task has been scheduled for Ant2 - it is called
"condition" ;)

>> Flow control is not the right way to do it in most cases (all
>> of them???) -
>> instead templating offers a better alternative.
>> Unfrortunately we have to
>> wait till ant2 before this becomes a reality ;)
>>
>
>I keep listening to "templating" as one of these magic bullets. I have not
>seen the first concreate example on how such "templating" mechanism could
>work and how it can be applied to solve any of the issues people claim it
>can solve.
>
>Can someone enlight us and show how they conceived such a thing to work? I
>am not asking for running code, just give some hand waving example.
>
>Half of the time these has been proposed, I fail to see how it can be used
>to solve the problem without becomming yet another full language.

Who saids it won't be another fully blown language? ;) XSLT is what I
intend to use unless something better comes along. Essentially it allows
you to do as much or as little transformation on your build files as you want.

Most logic requests have been about setting values of properties, recursive
ant calls based on directories, repetition of ant targets with different
parameters etc. These can almost always be determined statically but are
done at runtime because there is as yet no templating done. Effectively
most people want to squish the functionality of autoconf, automake and make
into one process (when naturally thats a bad idea).

My main aim is to have build files that look like the following

<mybuild>

  <library name="jmx" version="1.2"/>
  <library name="xerces" version="2.1"/>

  <product name="myjar" type="jar">
    <include name="org/apache/myjar/**" />
  </product>

  <product name="myotherjar" type="jar">
    <include name="org/apache/myotherjar/**" />
  </product>

</mybuild>

It would then be transformed into whatever low-level build file required
(ie all jar/javadoc/dist targets) via XSLT.
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