ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
Subject Re: AW: setting environmental variable from Ant script
Date Fri, 14 Mar 2003 09:50:39 GMT
In unix setting env variables in child processes has no
effect on the env variables of parent processes, so using exec
in this fashion will not work.

One use the exec task to set env variable for the
child process it creates  (from the ant manual)

<exec executable="emacs">
  <env key="DISPLAY" value=":1.0"/>
</exec>

Peter


On Friday 14 March 2003 09:20, Jan.Materne@rzf.fin-nrw.de wrote:
> So you can write a target for that?
>
> <target name="setEnv">
>     <exec executable="setX" ... os="windows"/>
>     <exec executable="set"  ... os="unix"/>
>     ... other platforms
> </target>
>
>
> Jan Matèrne
>
>
> -----Ursprüngliche Nachricht-----
> Von: kriss [mailto:madrockriss@hotmail.com]
> Gesendet am: Freitag, 14. März 2003 10:15
> An: Ant Users List
> Betreff: Re: setting environmental variable from Ant script
>
> I'm afraid there is nothing platform-independent, in windows you can use
> setX from the Ressource kit, and in linux/unix worlds the standard command.
>
> kriss
>   ----- Original Message -----
>   From: Alexei Betin
>   To: Ant Users List
>   Sent: Thursday, March 13, 2003 8:07 PM
>   Subject: setting environmental variable from Ant script
>
>
>   is there a clean platform-independent way
>   that I am missing or I simply should
>   have my build script generate a shell-script
>   & call it?
>
>   Thanks,
>   ~Alexei
>
>   ---------------------------------------------------------------------
>   To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>   For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message