ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guru Balse <guru.ba...@oracle.com>
Subject Re: Running <exec> for multiple files
Date Wed, 17 Mar 2004 21:38:22 GMT
An approach like this would work (you need ant contrib for this):

<?xml version="1.0"?>
<project name="test-for" default="test-for">
  <!-- Need to put ant-contrib-0.5.jar in the %ANT_HOME%/lib directory -->
  <taskdef resource="net/sf/antcontrib/antcontrib.properties"	/>
  <target name="test-for">
    <foreach param="this-file" target="test">
      <path>
        <!-- add includes/excludes as needed -->
        <fileset dir="." includes="*.xml" />
      </path>
    </foreach>
  </target>

  <target name="test">
    <!-- use ${this-file} to append to a string for subsqeuent execution via <arg line="..."
 
         For now print each filename out -->
    <echo>${this-file}</echo>
  </target>

</project>


Bernd J├╝rgens wrote:
> 
> Hi,
> 
> I need a way to run a <exec> for multiple files, since idlj can't
> process wildcards. I have some 30 idl files which I would like to
> include in a build.xml. So my question is: How do I put in here:
> 
> <target name="StdIDL" depends="init">
>   <echo> Generating Std stubs, helper classes and ties from IDL </echo>
>   <exec executable="idlj">
>    <arg value="-fall"/>
>    <arg value="-td"/>
>    <arg value="${build}\generated"/>
>    <arg value="${src}\_____________"/>   <!-- what goes here ? -->
>   </exec>
> </target>
> 
> The amount of idl files for processing will grow over time, so I
> need some wildcard approach.
> 
> TIA,
> Bernd
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org

-- 
Guru Balse
   Oracle - Server Technologies - iAS Integration QA
   Work: 650.506.1611 (1op668 - HQ)

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message