ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Dimock <t...@cornell.edu>
Subject Re: Possible Exec and MatchingTask Refactorings
Date Tue, 27 Jun 2000 13:30:04 GMT
At 11:34 AM 06/27/2000 +0200, Stefan wrote:
>* There are at least three ways I could understand a file list provided
>to a plain exec task:
>
>(1) Run the command on each of the files - once per file - and always
>add the filename to the command line (probably as the last argument).
>
>(2) Run the command on all of the files at once - add all filenames as
>arguments to the command line (probably as the last arguments).
>
>(3) Run the filenames as the command to execute.

Going in a slightly different direction with this, how about a <worklist>
task which creates a named list of files?  <worklist> would be a
MatchingTask, saving the generated list of files under a name wich could be
referenced similar to a property. Then your three ways become:

(1) <worklist name="myFiles" dir=...   includes=...    />
    <exec command="whatever" dir="${myFiles}"    />

(2) <worklist name="myFiles" dir=...   includes=...    />
    <exec command="whatever ${myFiles}" dir="."    />

(3) <worklist name="myCmds" dir=...   includes=...    />
    <exec command="${myCmds}" dir="."    />

This could then even take your 54 test cases example and run each of them
on you 20 sets of test data:

(4) <worklist name="myCmds" dir=...   includes=...    />
    <worklist name="myFiles" dir=...   includes=...    />
    <exec command="${myCmds}" dir="${myFiles}"    />

Of course this is pretty seriously mangling the syntax as shown, but there
has been talk of redoing the ${} syntax anyways....
 
----------------------------------------------------------------------------
       Tom Dimock  ----  Cornell University  ----  tad1@cornell.edu
"There go my people.  I must follow them, for I am their leader."  M. Gandhi

Mime
View raw message