title: maven ignoring jenv settings
body: <p>I had OSX with <code>Java 1.6</code> installed, and I just installed <code>jenv</code> along with <code>Java 1.7</code>:</p>
  
  <pre><code>$ jenv local '1.7'
  $ jenv versions
    system
    1.6
    1.6.0.65
  * 1.7 (set by /Users/me/workspace/.java-version)
    1.7.0.79
    oracle64-1.6.0.65
    oracle64-1.7.0.79
  </code></pre>
  
  <p><code>jenv</code> is doing its job, with <code>$ java -version</code> always working, showing 1.6 when I've set it to 1.6, and 1.7 when I've set it to 1.7:</p>
  
  <pre><code>$ java -version
  java version "1.7.0_79"                    &lt;--------------------------------- 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)
  </code></pre>
  
  <p><b>... but maven is ignoring my settings:</b></p>
  
  <pre><code>$ mvn -version
  Apache Maven 3.0.2 (r1056850; 2011-01-08 19:58:10-0500)
  Java version: 1.6.0_65, vendor: Apple Inc. &lt;--------------------------------- 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"
  </code></pre>
  
  <p>I found <a href="https://stackoverflow.com/questions/27026169/maven-ignoring-java-home-on-osx">this SO question</a> where the guy just needed to hardcode his <code>JAVA_HOME</code> inside <code>.mavenrc</code>, but I don't want mine hard-coded (thus <code>jenv</code>!), and I don't have a <code>~/.mavenrc</code>, nor an <code>/etc/mavenrc</code>.</p>
  
  <p>The version it's using seems to be from whatever's first on the <code>/usr/libexec/java_home</code> output, so in the short term I was able to get 1.6 back again by tweaking 1.7's <code>Info.plist</code> file (from <a href="https://stackoverflow.com/a/20994919/145499">this SO post</a>), but that just means I get 1.6 instead of 1.7. </p>
  
  <p>Any ideas?</p>