[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ant-user
Subject:    RE: problem with environment variable
From:       Dominique Devienne <DDevienne () lgc ! com>
Date:       2002-07-30 15:38:35
[Download RAW message or body]

Just check it under source control, that way you'll know where it's at
relatively in your project, and you'll control the version in use... --DD

-----Original Message-----
From: TINE Houari (OBJECTIVA) [mailto:houari.tine@ca-cedicam.fr] 
Sent: Tuesday, July 30, 2002 3:51 AM
To: 'Ant Users List'
Subject: RE: problem with environment variable

So I can't install Ant automatically...

 -----Message d'origine-----
De : 	Hal Hildebrand (web) [mailto:Hal.Hildebrand@hellblazer.com] 
Envoyé :	lundi 29 juillet 2002 22:03
À :	Ant Users List
Objet :	Re: problem with environment variable


----- Original Message -----
From: "Dominique Devienne" <DDevienne@lgc.com>


> I'm probably wrong, but it sounded to me that the original poster wanted
to
> modify the environment of the shell/cmd running Ant, which cannot be done
> AFAIK. Modifying the registry will take effect on cmd.exe run after the
> change, not the one currently running Ant. And the proposed solution
affects
> the environment of the command run only, and doesn't persist across <exec>
> invocations. --DD

Agreed.  I was just trying to give him some options that might work,
depending
on what it is he actually was trying to accomplish.

> -----Original Message-----
> From: Hal Hildebrand (web) [mailto:Hal.Hildebrand@hellblazer.com]
>
> We haven't found a way to do this from the command line, but you can do
this
> with specialized code.
>
> See JRegistryKey:  http://www.beq.ca/tech/Products/jreg_key.shtml
>
> It's easy to use the above to create a custom Ant task which will
> permanently
> manipulate the windows registry, such as path and environment variables.
> However, the Ant process executing the task, and any spawned executables
> don't
> inherit the environment.  <sigh>  There apparently is some Win32 call
which
> will
> force an update of the environment variables, but I haven't followed the
> bread
> crumbs to find out if there is such a thing.
>
> Another option is to use nested <env> elements:
>
> <exec dir="${basedir}" executable="cmd.exe">
>     <arg line="/c set"/>
>     <env key="test" value="tst" />
> </exec>
>
> It's not elegant, but it works.
>
> ----- Original Message -----
> From: "Dominique Devienne" <DDevienne@lgc.com>
> >
> > There's no problem. This cannot be done. --DD
> >
> > -----Original Message-----
> > From: TINE Houari (OBJECTIVA) [mailto:houari.tine@ca-cedicam.fr] >
> >
> > I has followed the indication given by Tibor Strausz about creation of
> > environment variable from Ant through <exec>.
> >
> > But, it does't work.
> >
> > <exec dir="${basedir}" executable="cmd.exe">
> >   <arg line="/c set test=tst"/>
> > </exec>
> >
> > <exec dir="${basedir}" executable="cmd.exe">
> >   <arg line="/c set"/>
> > </exec>
> >
> > Second task don't print test. What's problem.
> >
> > TINE
> >
> > --
> > To unsubscribe, e-mail:
<mailto:ant-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
<mailto:ant-user-help@jakarta.apache.org>
> >
> > --
> > To unsubscribe, e-mail:
<mailto:ant-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
<mailto:ant-user-help@jakarta.apache.org>
> >
> >
> >
>
>
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>
>
>


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

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

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic