ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lule Chen" <llc...@nortelnetworks.com>
Subject RE: Foreach and passing parameters
Date Thu, 10 Jul 2003 20:31:01 GMT
But this way it only passes the "myvalue" to the target without the file
name in the directory it iterates to.

Louis

-----Original Message-----
From: Jacob Kjome [mailto:hoju@visi.com] 
Sent: July 10, 2003 3:19 PM
To: Ant Users List
Subject: Re: Foreach and passing parameters



How about...

<foreach ...>
<param name="myparam" value="myvalue" />
</foreach>

Jake

At 02:54 PM 7/10/2003 -0400, you wrote:
>Hi, I have a foreach tasks as the following:
>
>    <target name="build">
>       <foreach target="compile_idl" param="file">
>          <path>
>             <fileset dir="${env.VOB_DIR}/nt/common">
>                <include name="*.idl"/>
>             </fileset>
>          </path>
>       </foreach>
>    </target>
>
>    <target name="compile_idl">
>       <echo message="compile ${file} by using ${env.ORBIXWEB_IDL}"/>
>       <exec executable="${env.ORBIXWEB_IDL}">
>          <arg line="-I  ${env.VOB_DIR} -I ${env.VOB_DIR} -jO 
>${env.GENERATEDJAVASRCDIR}/nt/common ${file}"/>
>       </exec>
>    </target>
>
>The foreach task iterates on each idl file in the directory and passes 
>each file name by the param "file" to the target. My question is, if I 
>want to pass additional parameters to the target, what should I do?
>
>
>Thanks for your help!
>
>
>Louis


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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message