ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "X3J 1657" <x3j1...@hotmail.com>
Subject Re: How to set a new Environment variable from build.xml
Date Tue, 09 Jul 2002 12:31:48 GMT
Hi Bala,

This is what I'm doing:

<target name="set">
<exec executable="D:/ant/bin/ant.bat" dir=".">
      <env key="PROJDIR" value="D:/Versata_VIS"/>
</exec>
<property environment="env"/>
<echo>
----------------------------
| Your PROJDIR variable is : |
----------------------------
PROJDIR=${env.PROJDIR}
PROJDIR=${PROJDIR}

</echo>
</target>

And my ouptut is:

----------------------------
| Your PROJDIR variable is : |
----------------------------
PROJDIR=${env.PROJDIR}
PROJDIR=D:/Versata_VIS

Apparantly, the variable PROJDIR is not getting set as environment variable.

Any help/suggestions.

Thanks,

X3J



>From: "Kanesamoorthy Balakumar" Reply-To: "Ant Users List" To: "Ant Users 
>List" Subject: Re: How to set a new Environment variable from build.xml 
>Date: Tue, 9 Jul 2002 10:24:03 +0600
>
>You can use tag for this purpose. There is an arguments called env,which 
>will pass the environment variable via system command.
>
>Bala.
>
>----- Original Message ----- From: "X3J 1657" To: Sent: Tuesday, July 09, 
>2002 10:00 AM Subject: How to set a new Environment variable from build.xml
>
>
> > How do I set environment variables using ANT? > > I have two targets in 
>the same build.xml that would build two modules for > me. > To build Module 
>"A", one of the environment variable PROJDIR should point to > "C:\TEMP1" 
>folder. > To build Module "B", the same environment variable PROJDIR should 
>point to > "C:\TEMP2" folder. > > Any help/references would be appreciated. 
> > > _________________________________________________________________ > 
>MSN Photos is the easiest way to share and print your photos: > 
>http://photos.msn.com/support/worldwide.aspx > > > -- > To unsubscribe, 
>e-mail: > For additional commands, e-mail: > >
>
>
>--
>To unsubscribe, e-mail: For additional commands, e-mail:

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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


Mime
View raw message