What about simple sets of sets of files? For instance:

<foreach iterator="propfile">
    <iterator tokens="one.props,two.props"
              delimiter=","/>
    <property file="${propfile}"/>
    <filter filtersfile="${propfile.filtersfile}"/>
    <copy filtering="on" 
           todir="${something.from.one.props}">
        <fileset dir="${someother.one.props}">
            <include name="*properties"/>
        </fileset>
    </copy>
    <ftp --somestuff-->
        <fileset dir="${something.from.one.props}"/>
    </ftp>
</foreach>

I realize that on a case-by-case basis, we can solve
any and all needs for iteration, by masking them off
into custom tasks. However, this doesn't provide a
very maintainable build when passed off to the next
maintainer. Also, I believe firmly in the importance
of minimal vocabulary; the complexity is conserved in
either case (for or against foreach), since in one
case you trade a larger vocabulary for lack of core
iteration.

While I understand that not all tasks would wisely be
used within the foreach loop, I would like the chance
to rely upon my own wisdom to follow best practices
for such matters. If you build a tool that will run at
peak efficiency for newbies to that tool's vocab. then
your tool's power will be limited by that newbie.

(On a side note: is it possible to create a batchable
interface that tasks which could be embedded in
foreach loops would then implement, just to provide a
warning?)

All IMHO, of course. :)

John

--- Roger Vaughn <[EMAIL PROTECTED]> wrote:
> --- Stefan Bodewig <[EMAIL PROTECTED]> wrote:
> > In certain circumstances - and I don't pretend
> that we can anticipate
> > everything.  To me foreach (or iterate or
> whatever) are probably most
> > useful for sets that are not sets of files, but
> some new user defined
> > data types.
> 
> That's an excellent point.  I believe foreach is
> useful for both, but for sets
> which are not sets of files, we currently have no
> other alternatives.
> 
> An example I'm sending to Allen actually uses sets
> of directories - it's kind
> of a border case.  They're technically files, but
> from the point of view of the
> build - not really.
> 
> roger
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail -
> only $35 
> a year!  http://personal.mail.yahoo.com/


=====
John Casey

[EMAIL PROTECTED]
Omni CodeWorks, Inc.

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Reply via email to