ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@ufl.edu
Subject Re: looping (RE: Foreach task)
Date Mon, 11 Jun 2001 16:16:48 GMT

=> On Mon, 11 Jun 2001 23:06:34 +1000, Peter Donald <donaldp@apache.org> said:

[...]

> However the usecase that ant needs is executing the same set of tasks with
> different parameters. ie Repeat tasks t1 -> tn with different values for A,
> B and C properties. It is really useful when you need to repeate the set of
> operations over a large number of datasets (ie if you have 30 taglibs that
> all require same steps to generate compile and deploy etc).


OK, this feels to my ant-naive perceptions like a case of what I quoted.  I'll
spit out a straw man, and tell me where I'm missing your point?

<fileset name="tld-targets">
 <30 taglib names/>
</fileset>

<target t0>
  <compile a big load of stuff/>
</target>


<target t1 depends="t0">

  <frobtaglib>
    <mytargetsref="tld-targets"/>

    <!-- Frobtaglib identifies a set of source/target mappings inferred from
	 the target fileset.  Let's say it makes .jar s -->

  </frobtaglib>

</target>

<target t2 depends="t1">
  <twiddletaglib/>
   <mytargetsref="tld-targets"/>
   <!--  And so on -->
  </twiddletaglib>

</target>


The critical difference is:

(forall $Thing: T1,T2,T3)

vs.

(forall $Thing: T1)
(forall $Thing: T2)
(forall $Thing: T3)


I assert that, for any real case of T1,T2,T3 it is possible to 'phrase' the
goal in either idiom.  I welcome attempts at counterexamples. The complexities
and pitfalls of the "transform sets of files" are different than those of the
"run scripts on individual files".  But I bet they are in fact provably
equivalent.

...

And one of them is ant-y.  The other one is anti-ant-y.


- Allen S. Rout

Mime
View raw message