ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject RE: Preserving URL paths in <apply> tasks
Date Thu, 14 Mar 2002 04:39:14 GMT
--- Jeff Lowery <> wrote:
> > Is there some reason you're using <apply> with a <fileset>, 
> > when you only have the one file?  
> Just using it as an example. Replace "generic.xs" with "*.xs" and you'll
> see where I'm going.

Gotcha. So okay, I don't think <apply>'s gonna do it for you. Since you're
not using a <mapper>, I assume you don't have a srcfile->targetfile
timestamp-checking need -- you just want to run them all through whenever
you do, right?  Assuming a "yes", I think you'll need to get the fileset,
convert that to a list of names the way you want them, then feed them
through <exec>, using either the ant-contrib <foreach> task or a <script>

Here's using the <foreach> (which I can either send you, or you can pick
up from Sourceforge):
<project name="lowery" default="xsv2">

  <taskdef resource="net/sf/antcontrib/"/>

  <fileset dir="D:/xml/schemas" id="xsfileset">
    <include name="*.xs"/>

  <target name="xsv2">
    <pathconvert pathsep="," dirsep="/" property="xsfiles"
      <map from="D:" to="file://d"/>
    <foreach list="${xsfiles}" target="runXSV" param="xsfile"/>

  <target name="runXSV">
    <exec executable="echo">
      <arg value="${xsfile}"/>


I just used 'echo', since I don't have any XS files to use for real, but
you get the idea.



Do You Yahoo!?
Yahoo! Sports - live college hoops coverage

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message