title: Eclipse - Maven project changing source compliance
body: <p>I have a mid-size project in java eclipse, in which all dependencies were being manually imported into the build path. For the sake of sanity, I wanted to convert it to a maven project.</p>
  
  <p>The problem is: I had the source level/jre defined for 1.8 and when i converted to a maven project, It switched to the default of 1.5.</p>
  
  <p>I tried some answers around SO for forcing the source compliance in maven to 1.8 but it didn't work.</p>
  
  <p>I added to the </p>
  
  <pre><code>&lt;build&gt;
  &lt;plugins&gt;
      &lt;plugin&gt;
          &lt;groupId&gt;[project group id]&lt;/groupId&gt;
          &lt;artifactId&gt;[project artifact id]&lt;/artifactId&gt;
          &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
          &lt;configuration&gt;
              &lt;source&gt;1.8&lt;/source&gt;
              &lt;target&gt;1.8&lt;/target&gt;
          &lt;/configuration&gt;
      &lt;/plugin&gt;
  &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>Is anything missing here?</p>
  
  <p>EDIT1: Forget me, I'm bad. The correct version is:</p>
  
  <pre><code>&lt;build&gt;
  &lt;plugins&gt;
      &lt;plugin&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
          &lt;configuration&gt;
              &lt;source&gt;1.8&lt;/source&gt;
              &lt;target&gt;1.8&lt;/target&gt;
          &lt;/configuration&gt;
      &lt;/plugin&gt;
  &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>