ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanislas Pinte <stan.pi...@wanadoo.be>
Subject Re: Question about <arg>s in <exec>
Date Thu, 16 Nov 2000 13:19:32 GMT
At 07:07 PM 11/15/00 -0800, you wrote:
>Conditionally set a property, ${Vflag}, then pass that in the <arg>
>instead of hard-coding the -V${label} in the <arg>.


Could you give an example, please? I couldn't understand what you mean.

Stan


>Diane
>
>--- Eric Hodges <eric.hodges@mongoosetech.com> wrote:
> > I have a couple of arguments that I need to use conditionally.  If
> > property "label" is defined, for instance, I want to do this:
> >
> >   <target name="fetch">
> >     <mkdir dir="${fetchToDir}" />
> >     <exec dir="${src}" executable="ss" >
> >       <env key="ssdir" value="\\puffnstuff\common\vss"/>
> >       <env key="ssuser" value="hodges"/>
> >       <arg value="get"/>
> >       <arg value="$$\${fetchTarget}"/>
> >       <arg value="-I-"/>
> >       <arg value="-V${label}" />
> >       <arg value="-GL${basedir}\${fetchToDir}"/>
> >     </exec>
> >   </target>
> >
> > Otherwise, I want to do the same thing but without the "-V" argument,
> > like this:
> >
> >   <target name="fetch">
> >     <mkdir dir="${fetchToDir}" />
> >     <exec dir="${src}" executable="ss" >
> >       <env key="ssdir" value="\\puffnstuff\common\vss"/>
> >       <env key="ssuser" value="hodges"/>
> >       <arg value="get"/>
> >       <arg value="$$\${fetchTarget}"/>
> >       <arg value="-I-"/>
> >       <arg value="-GL${basedir}\${fetchToDir}"/>
> >     </exec>
> >   </target>
> >
> > I've got two of these conditional arguments, so I'd have to make 4
> > targets to cover them all.  There must be a better way.  Any wisdom
> > out there?
>
>=====
>(holtdl@yahoo.com)
>
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Calendar - Get organized for the holidays!
>http://calendar.yahoo.com/

-------------------------------------------------------

Stanislas Pinte
Software engineer - Trademine-europe
Tel: 00 32 486 67 78 86

-------------------------------------------------------


Mime
View raw message