title: Maven enforcer doesn't detect jdk 1.7
body: <p>I am using maven enforcer plugin to enforce only jdk 1.7 (I am using java.nio.file).
  For some reason, maven enforcer plugin can't detect jdk 1.7.</p>
  
  <pre><code>λ ~/ java -version
  java version "1.7.0_13"
  Java(TM) SE Runtime Environment (build 1.7.0_13-b20)
  Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
  λ ~/ javac -version
  javac 1.7.0_13
  λ ~/ mvn --version
  Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 15:51:28+0200)
  Maven home: /usr/local/Cellar/maven/3.0.5/libexec
  Java version: 1.7.0_13, vendor: Oracle Corporation
  Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_13.jdk/Contents/Home/jre
  Default locale: en_US, platform encoding: UTF-8
  OS name: "mac os x", version: "10.7.5", arch: "x86_64", family: "mac"
  </code></pre>
  
  <p>This is the code I have in my pom.xml - </p>
  
  <pre><code>   &lt;plugin&gt;
        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
        &lt;artifactId&gt;maven-enforcer-plugin&lt;/artifactId&gt;
        &lt;executions&gt;
          &lt;execution&gt;
            &lt;id&gt;enforce-versions&lt;/id&gt;
            &lt;goals&gt;
              &lt;goal&gt;enforce&lt;/goal&gt;
            &lt;/goals&gt;
            &lt;configuration&gt;
              &lt;rules&gt;
                &lt;requireJavaVersion&gt;
                  &lt;version&gt;1.7&lt;/version&gt;
                &lt;/requireJavaVersion&gt;
              &lt;/rules&gt;
            &lt;/configuration&gt;
          &lt;/execution&gt;
        &lt;/executions&gt;
      &lt;/plugin&gt;
  </code></pre>
  
  <p>And this is the error I get - </p>
  
  <pre><code>[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-versions) @ com.microsoft.gittf.core ---
  [WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message:
  Detected JDK Version: 1.6.0-43 is not in the allowed range 1.7.
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <blockquote>
    <p>mvn enforcer:display-info</p>
  </blockquote>
  
  <p>shows version 1.7 and not 1.6... why the enforce detects java version 1.6?</p>