ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject RE: Foreach and passing parameters
Date Thu, 10 Jul 2003 21:20:41 GMT

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: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


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


Mime
View raw message