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

Reply via email to