title: Maven has problem with JAVA_HOME when 'system' version set with jenv
body: <p>I'm on MacOS, zsh.</p>
  <p>I've installed jenv, added several java versions.</p>
  <p>I've ran</p>
  <pre><code>jenv enable-plugin maven
  </code></pre>
  <p>and</p>
  <pre><code>jenv enable-plugin export
  </code></pre>
  <p>jenv doctor returns:</p>
  <p>[OK]    JAVA_HOME variable probably set by jenv PROMPT<br />
  [OK]    Java binaries in path are jenv shims<br />
  [OK]    Jenv is correctly loaded</p>
  <p>jenv versions returns:</p>
  <pre><code>* system (set by /Users/[user]/.jenv/version)  
    1.8. 
    1.8.0.271  
    11  
    11.0  
  ...
  </code></pre>
  <p>But when I start a terminal session and run mvn --version I get</p>
  <pre><code>The JAVA_HOME environment variable is not defined correctly
  This environment variable is needed to run this program
  NB: JAVA_HOME should point to a JDK not a JRE
  </code></pre>
  <p>If I set a non system java version with jenv it works fine, like:</p>
  <pre><code>~/ jenv shell 11  
  ~/ mvn --version  
  Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)  
  Maven home: /usr/local/Cellar/maven/3.6.3_1/libexec  
  Java version: 11.0.9, ...  
  </code></pre>
  <p>But how come it doesn't work when the jenv version is system?</p>