You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Hogeweg, Erwin (GE Infrastructure)" <Er...@ge.com> on 2005/09/29 03:13:24 UTC

RE: jelly: How to get a reference to an environment variable?: solved

I missed the fact that I had to define the "env" variable. Thought that was a built-in.

So:

  <ant:property environment="env"/>
  <ant:echo message="JAVA_HOME=${env.JAVA_HOME}"/>

Does the trick.

Also note that the variable is case sensitive, also under windows. JAVA_HOME != Java_Home.

Erwin

> -----Original Message-----
> From: Hogeweg, Erwin (GE Infrastructure) 
> Sent: Wednesday, September 28, 2005 5:07 PM
> To: Maven Users List
> Subject: jelly: How to get a reference to an environment variable?
> 
> 
> Hi,
> 
> I need a reference to JAVA_HOME in my jelly script but the 
> tag below doesn't seem to work. All I get is "JAVA_HOME=" 
> (w/o the quotes of course).
> 
>     <ant:echo message="JAVA_HOME=${env.JAVA_HOME}"/>
> 
> So I assume there is a different way to do this but I can not find it.
> 
> Any help is highly appreciated.
> 
> Thanks,
> 
> Erwin
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org