You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Yura Ivanov <iv...@offshorecreations.com.ua> on 2004/03/22 12:27:58 UTC

how can I get JAVA_HOME

Hi All, 

I am a new in maven. In ant I could get JAVA_HOME as ${env.JAVA_HOME}, but in maven it doesn't work. How can I get JAVA_HOME variable from environment?

Regards, 
Yuriy Ivanov.

Re: how can I get JAVA_HOME

Posted by Yura Ivanov <iv...@offshorecreations.com.ua>.
Thanks!!!
----- Original Message ----- 
From: "matthew.hawthorne" <ma...@apache.org>
To: "Maven Users List" <us...@maven.apache.org>
Sent: Monday, March 22, 2004 4:31 PM
Subject: Re: how can I get JAVA_HOME


> Yura Ivanov wrote:
> > when I execute test goal it didn't work
> > 
> >   <goal name="test">
> >    <echo>Java Home is  ${env.JAVA_HOME} </echo>
> >   </goal>
> > 
> > out ---
> > 
> > test:
> >     [echo] Java Home is
> > BUILD SUCCESSFUL
> > Total time: 4 seconds
> 
> 
> The code that you're executing wouldn't work in Ant either.  First, you 
> have to do:
> 
> <property environment="env"/>
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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


Re: how can I get JAVA_HOME

Posted by "matthew.hawthorne" <ma...@apache.org>.
Yura Ivanov wrote:
> when I execute test goal it didn't work
> 
>   <goal name="test">
>    <echo>Java Home is  ${env.JAVA_HOME} </echo>
>   </goal>
> 
> out ---
> 
> test:
>     [echo] Java Home is
> BUILD SUCCESSFUL
> Total time: 4 seconds


The code that you're executing wouldn't work in Ant either.  First, you 
have to do:

<property environment="env"/>




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


Re: how can I get JAVA_HOME

Posted by Yura Ivanov <iv...@offshorecreations.com.ua>.
when I execute test goal it didn't work

  <goal name="test">
   <echo>Java Home is  ${env.JAVA_HOME} </echo>
  </goal>

out ---

test:
    [echo] Java Home is
BUILD SUCCESSFUL
Total time: 4 seconds

----- Original Message ----- 
From: "matthew.hawthorne" <ma...@apache.org>
To: "Maven Users List" <us...@maven.apache.org>
Sent: Monday, March 22, 2004 4:01 PM
Subject: Re: how can I get JAVA_HOME


> Yura Ivanov wrote:
> > I am a new in maven. In ant I could get JAVA_HOME as ${env.JAVA_HOME}, 
>  > but in maven it doesn't work. How can I get JAVA_HOME variable from 
> environment?
> 
> 
> You can do it the exact same way as in Ant, except it has to be inside a 
> goal in a maven.xml file.
> 
> 
> ---------------------------------------------------------------------
> 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


Re: how can I get JAVA_HOME

Posted by Yura Ivanov <iv...@offshorecreations.com.ua>.
when I execute test goal it didn't work

  <goal name="test">
   <echo>Java Home is  ${env.JAVA_HOME} </echo>
  </goal>

out ---
----- Original Message ----- 
From: "matthew.hawthorne" <ma...@apache.org>
To: "Maven Users List" <us...@maven.apache.org>
Sent: Monday, March 22, 2004 4:01 PM
Subject: Re: how can I get JAVA_HOME


> Yura Ivanov wrote:
> > I am a new in maven. In ant I could get JAVA_HOME as ${env.JAVA_HOME}, 
>  > but in maven it doesn't work. How can I get JAVA_HOME variable from 
> environment?
> 
> 
> You can do it the exact same way as in Ant, except it has to be inside a 
> goal in a maven.xml file.
> 
> 
> ---------------------------------------------------------------------
> 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


Re: how can I get JAVA_HOME

Posted by "matthew.hawthorne" <ma...@apache.org>.
Yura Ivanov wrote:
> I am a new in maven. In ant I could get JAVA_HOME as ${env.JAVA_HOME}, 
 > but in maven it doesn't work. How can I get JAVA_HOME variable from 
environment?


You can do it the exact same way as in Ant, except it has to be inside a 
goal in a maven.xml file.


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