ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: Setting environment variables
Date Tue, 16 Sep 2003 08:28:00 GMT
Check whether exists

    <!-- access to environment variables -->
    <property environment="env"/>      <!-- 'env' is a common prefix -->

    <!-- check -->
    <fail message="SERVER_HOME not defined" unless="env.SERVER_HOME"/>

Add to startupscript
    
    I think you will start the script via <exec>. Therefore you can use

    <exec executable="cmd.exe">        <!-- your script has suffix .cmd
therefore windows -->
        <arg line="/C thescript.cmd"/>
        <env key="SERVER_HOME" value="c:/path/to/server"/>
    </exec>


Jan




> -----Original Message-----
> From: Rose, Angus H [mailto:angus.rose@eds.com]
> Sent: Tuesday, September 16, 2003 10:22 AM
> To: 'user@ant.apache.org'
> Subject: Setting environment variables
> 
> 
> Hi All,
>         I'm new to Ant and need to know how to do the 
> following: How to
> check to see if an environment variable exists on a user's 
> machine and if
> it's not present, how would I add it to a startup script such as the
> startweblogic.cmd script?
> 
> Thanks in advance
> 
> Angus Rose
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message