title: Pass JAVA HOME as parameter to mvn
body: <p>I would like to know if it is possible to pass JAVA_HOME as parameter to mvn command line. I have searched almost everywhere, but couldn't find an answer to that.</p>
  
  <p>I know we can set JAVA_HOME using export, but I need to pass it as parameter if that is possible. Something like:</p>
  
  <pre><code> mvn install -DJava_Home=/usr/java/jdk-1.7.0
  </code></pre>