title: compile java source 1.7 for 1.6 with Maven and Netbeans
body: <p>I have a source code written for java 1.7. I would like to compile it for java 1.6. If I understood correctly, I need to use the options -source 1.7 -target 1.6</p>
  
  <p>I am using Maven2 and Netbeans (8.0). So, I tried :</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;version&gt;3.2&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.7&lt;/source&gt;
                  &lt;target&gt;1.6&lt;/target&gt;
                  &lt;compilerArguments&gt;
                      &lt;bootclasspath&gt;/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/rt.jar&lt;/bootclasspath&gt;
                  &lt;/compilerArguments&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>But I get a <code>javacTask: source release 1.7 requires target release 1.7</code></p>
  
  <p>I read that some people use eclipse compiler to make it work, but how can I do this if I'm using Netbeans ?</p>
  
  <p>Thanks a lot for your help</p>