I needed a way to iterate over a set of files and values, so I wrote
support for some tags that look like this:

<target name="targetA">
  <callover target="targetB">
    <paramset name="param1">
      <fileset dir="myDir" includes="*foo*"/>
    </paramset>
    <paramset name="param2">
      <valueset values="x|y|z|abc" delimiter="|"/>
    </paramset>
  </callover>
</target>

<target name="targetB">
  <echo message="${param1} : ${param2}"/>
</target>


myDir contains the files bar1, bar2, foobar, foo1, and foo2.

When the above is run, the result is:

targetA:

targetB:
     [echo] foo1 : x

targetB:
     [echo] foo1 : y

targetB:
     [echo] foo1 : z

targetB:
     [echo] foo1 : abc

targetB:
     [echo] foo2 : x

targetB:
     [echo] foo2 : y

targetB:
     [echo] foo2 : z

targetB:
     [echo] foo2 : abc

targetB:
     [echo] foobar : x

targetB:
     [echo] foobar : y

targetB:
     [echo] foobar : z

targetB:
     [echo] foobar : abc


So the callover tag provides enumerated values to specified variables in
calls to another target in the file.  Useful mainly for single sets of
values because otherwise it can get unwieldy (n*m combinations).

Since I found this to be amazingly useful, I decided to ask if anyone else
thinks the same.  If so, I could package up the code and put it out.

-Steve Morgan
 [EMAIL PROTECTED]

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

Reply via email to