ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: Foreach task)
Date Tue, 12 Jun 2001 08:02:08 GMT
At 09:29 AM 6/12/01 +0200, Stefan Bodewig wrote:
>Peter Donald <> wrote:
>> At 09:20 AM 6/12/01 +0200, Stefan Bodewig wrote:
>>>Peter Donald <> wrote:
>>>> (3) Remove iteration from all tasks and core and implement it in
>>>> another layer ;)
>>>In another layer that is not a task?
>> yup ;)
>Care to expand?

Okay - but remember you asked for the can of worms to be opened ;) 

"templating" - if you remember the first example of using XSLT (posted eons
ago) they defined multiple input data items which got expanded into
appropriate underlying form. For instance you could have an input file that
looked something like

  <server ip="" dir="/pub"/>
  <server ip="" dir="/pub/somedir"/>
  <server ip="" dir="/pub/another/place"/>
  <server ip="" dir="/pub/blah"/>
  <server ip="" dir="/pub"/>

  <product name="foo" package="" version="1.0"/>
  <product name="bar" package="" version="1.0"/>
  <product name="baz" package="" version="1.0"/>
  <product name="meep" package="" version="1.0"/>
  <product name="muup" package="" version="1.0"/>
  <product name="moop" package="" version="1.0"/>

When this is passed through template, each product would be expanded to a
set of tasks such as.

 <copy useing filters to replace version/>
 <scp jar to server1 />
 <scp jar to server2 />
 <scp jar to server3 />

The transformation from input-data to tasks would be via some rule/template
system (ie XSLT) and in theory could be implemented in any number of ways
(most obvious optimization would be to copy and compile all java classes at



| "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               |

View raw message