title: Which compiler version maven is using here?
body: <p>I am using below maven compiler plugin to compile my java code:</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
      &lt;inherited&gt;true&lt;/inherited&gt;
      &lt;version&gt;2.5.1&lt;/version&gt;
      &lt;configuration&gt;
          &lt;source&gt;1.6&lt;/source&gt;
          &lt;target&gt;1.6&lt;/target&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>My java_home points to Java 7.</p>
  
  <p>My first question, will my classes be compiled with java 6 or java 7?</p>
  
  <p>If with java 6 (because of <code>&lt;source&gt;1.6&lt;/source&gt;</code> ), how maven will know
  the path java 1.6 as java home points to 1.7?</p>
  
  <p>If I need to compile the source code with java 1.8, do I need to set source and target as 1.8?</p>
  
  <p>But then, how maven will know that jdk 1.8 is in the path?</p>
  
  <p>Do i need to change java_home to point to java 8?</p>