You are right, I can pass multiple params to the target.

Thanks,

Louis

-----Original Message-----
From: Jacob Kjome [mailto:[EMAIL PROTECTED] 
Sent: July 10, 2003 5:21 PM
To: Ant Users List
Subject: RE: Foreach and passing parameters



Note that I did <foreach ....> , meaning that this was just a shorthand, 
not literal.  I was trying to be brief.  Basically, you'd do whatever 
foreach stuff you need and then also pass the individual <param>'s for 
other stuff you want to pass to a given target.

Jake

At 04:31 PM 7/10/2003 -0400, you wrote:
>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:[EMAIL PROTECTED]
>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: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to