Search code examples
javamavenmaven-3osx-mountain-lion

How to get Maven 3.0.4 to use Java7?


I've just updated maven from 3.0.3 to 3.0.4 using the compiled binaries from the official site.Now when I run mvn -version , it says that it uses the old java 6 version , instead of the java 7 version that I have installed on my machine (macbook pro). If I run the 3.0.3 version maven binary from inside its folder it uses the java 7 version. How can I configure maven 3.0.4 so that it uses the Java 7 version? Thank you.

PS : Java 7 is the default java version at my system (mountain lion).


Solution

  • Set the JAVA_HOME environment variable.