ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Malcolm Sparks" <malcolm.spa...@iona.com>
Subject RE: Controling the environment for exec tasks
Date Mon, 17 Jul 2000 14:24:26 GMT
> Yes, that'd be the way to go, and maybe if value was omitted use
> System.getenv to get the current value?

Stefan, you're showing your age. That method was deprecated in JDK1.1.
;-)

The Runtime.exec(String[] cmds, String[] envp) methods works 
without the need for scripts. The only difficulty is making the Ant
syntax intuitive and backwardly compatible.

Malcolm

> -----Original Message-----
> From: Stefan Bodewig [mailto:bodewig@bost.de]
> Sent: 17 July 2000 07:52
> To: ant-dev@jakarta.apache.org
> Subject: Re: Controling the environment for exec tasks
> 
> 
> >>>>> "JC" == Julien Couvreur <jcouvreur@redcart.com> writes:
> 
>  JC> <exec ...> 
>  JC>   <env key="k1" value="v1"/> 
>  JC>   <env key="k2" value="v2"/> 
>  JC> </exec>, 
> 
> Yes, that'd be the way to go, and maybe if value was omitted use
> System.getenv to get the current value?
> 
>  JC> but this needs the creation of a new parent class, 
> 
> No it wouldn't, all you'd need was a createEnv() method in Exec. I'm
> going to think about that when I start to rework the Exec stuff -
> should start with it this week.
> 
>  JC> And also, I don't know whether Ant support having "env" (or
>  JC> "include") called twice this way.
> 
> No limits on the multiplicity of nested elements. 
> 
> Take a look at the modifications I've made to
> docs/index.html#writingowntask and tell me if that makes sense to you
> - and post any corrections please, English is not my native language.
> 
> Stefan
> 

Mime
View raw message