title: Detected JDK Version: 1.6.0-24 is not in the allowed range 1.7
body: <p>When I ran the command</p>
  
  <pre><code>mvn clean package
  </code></pre>
  
  <p>I am getting error: </p>
  
  <pre><code>Detected JDK Version: 1.6.0-24 is not in the allowed range 1.7.
  </code></pre>
  
  <p>How to fix the above error? I tried to check jdk version isntalled and got this</p>
  
  <pre><code>java version "1.7.0_03"
  Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
  Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)
  </code></pre>
  
  <p>how to fix this?</p>