java - maven ignoring jenv settings -
i had osx java 1.6
installed, , installed jenv
along java 1.7
:
$ jenv local '1.7' $ jenv versions system 1.6 1.6.0.65 * 1.7 (set /users/me/workspace/.java-version) 1.7.0.79 oracle64-1.6.0.65 oracle64-1.7.0.79
jenv
doing job, $ java -version
working, showing 1.6 when i've set 1.6, , 1.7 when i've set 1.7:
$ java -version java version "1.7.0_79" <--------------------------------- yay!! java(tm) se runtime environment (build 1.7.0_79-b15) java hotspot(tm) 64-bit server vm (build 24.79-b02, mixed mode)
... maven ignoring settings:
$ mvn -version apache maven 3.0.2 (r1056850; 2011-01-08 19:58:10-0500) java version: 1.6.0_65, vendor: apple inc. <--------------------------------- bah!! java home: /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home default locale: en_us, platform encoding: macroman os name: "mac os x", version: "10.8.5", arch: "x86_64", family: "mac"
i found this question guy needed hardcode java_home
inside .mavenrc
, don't want mine hard-coded (thus jenv
!), , don't have ~/.mavenrc
, nor /etc/mavenrc
.
the version it's using seems whatever's first on /usr/libexec/java_home
output, in short term able 1.6 again tweaking 1.7's info.plist
file (from this post), means 1.6 instead of 1.7.
any ideas?
i had similar problem. got things running prefixing command jenv exec
:
jenv exec mvn -version
Comments
Post a Comment