ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Morgan <xera...@yahoo.com>
Subject By request, callover task
Date Fri, 06 Jul 2001 21:14:59 GMT

> I have a need for this task. If you have it packaged up, please
consider
> sending to me or to the ant-user mailing list. It's an excellent idea
-
> simple but powerful.

Simple, indeed.  To add the taskdef:

<taskdef name="callover" classname="ant.extensions.CallOverTask"/>

Include the appropriate classpath reference if needed.

To use:

<target name="myTarget">
  <callover target="otherTarget">
    <paramset name="varName">
      <fileset dir="sourceDir" includes="**/*"/>
    </paramset>
    <paramset name="altName">
      <valueset values="a|bc|d" delimiter="|"/>
    </paramset>
  </callover>
</target>

<target name="otherTarget">
  <echo message="varName = ${varName}, altName=${altName}"/>
</target>
 
callover will call the given target once for each combination of its
parameterized values.  fileset is ant's normal fileset tag.  valueset is
new, but it's a simple StringTokenizer.

The code is simple.  Enjoy!

-Steve  :)

=====
Steve Morgan       xerafin@yahoo.com   http://profiles.yahoo.com/xerafin



=====
Steve Morgan       xerafin@yahoo.com   http://profiles.yahoo.com/xerafin

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