Don,
Thanks, I've checked that, and it works fine. 

Will

> -----Original Message-----
> From: Don Taylor [mailto:[EMAIL PROTECTED]]
> Sent: 22 August 2001 16:05
> To: [EMAIL PROTECTED]
> Subject: Re: User property overridden in nested ant scripts
> 
> 
> 
> --- Will Dyke <[EMAIL PROTECTED]> wrote:
> > I wish to use a command line property occasionally,
> > to override that set in a 'wrapper' script, that 
> > in turn calls the main script. 
> > 
> > However, the property set in the wrapper script appears to
> > override that set on the command line once the main
> > script is called. 
> > 
> > As an example, I have two scripts, dummywrapper.xml, 
> > and dummy.xml
> > 
> > ========== dummywrapper.xml ===============
> > <project name="fakebuild" default="wrapper" basedir=".">
> >   <target name="wrapper">
> >     <ant antfile="dummy.xml" target="build-deploy">
> >       <property name="whoami" value="apps"/>
> >     </ant>
> >   </target>
> > </project>
> > 
> 
> The property element is embedded within the ant element. You are thus
> specifying the value of the property whoami for the *spawned* ant. The
> whoami property in the current execution is unaffected. Check 
> it out by
> putting an echo after the ant task.
> 
> Does anyone know if this would work:
> 
> <project name="fakebuild" default="wrapper" basedir=".">
>   <target name="wrapper">
>     <property name="whoami" value="apps"/>
>     <ant antfile="dummy.xml" target="build-deploy">
>       <property name="whoami" value="${whoami}"/>
>     </ant>
>   </target>
> </project>
> 
> -- Don
> 
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with 
> Yahoo! Messenger
> http://phonecard.yahoo.com/
> 


This e-mail, and any attachment, is confidential. If you have received
it in error, please delete it from your system, do not use or disclose
the information in any way, and notify me immediately. The contents of
this message may contain personal views which are not the views of the
BBC, unless specifically stated.

Reply via email to