title: Maven Java Source is 1.3 instead of 1.8
body: <p>I am using Maven and Java Spark to build a simple webservice.</p>
  
  <p>I am running Java 8.</p>
  
  <p>My (very simple) service:</p>
  
  <pre><code>package com.mycompany.app;
  
  import static spark.Spark.*;
  
      public class HelloWorld {
          public static void main(String[] args) {
              get("/hello", (req, res) -&gt; "Hello World");
          }
      }
  </code></pre>
  
  <p>The pom.xml file:</p>
  
  <pre><code>    &lt;project xmlns="http://maven.apache.org/POM/4.0.0"     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
        &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
        &lt;groupId&gt;com.simplerelevance.app&lt;/groupId&gt;
        &lt;artifactId&gt;art2&lt;/artifactId&gt;
        &lt;packaging&gt;jar&lt;/packaging&gt;
        &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
        &lt;name&gt;art2&lt;/name&gt;
        &lt;url&gt;http://maven.apache.org&lt;/url&gt;
        &lt;dependencies&gt;
          &lt;dependency&gt;
            &lt;groupId&gt;junit&lt;/groupId&gt;
            &lt;artifactId&gt;junit&lt;/artifactId&gt;
            &lt;version&gt;3.8.1&lt;/version&gt;
            &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
            &lt;groupId&gt;com.sparkjava&lt;/groupId&gt;
            &lt;artifactId&gt;spark-core&lt;/artifactId&gt;
            &lt;version&gt;2.2&lt;/version&gt;
          &lt;/dependency&gt;
        &lt;/dependencies&gt;
      &lt;/project&gt;
  </code></pre>
  
  <p>When I try to run <code>mvn compile</code>, my error is: </p>
  
  <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project art2: Compilation failure: Compilation failure:
  [ERROR] /home/pierceg/SR_Repos/ART2/art2_java/art2/src/main/java/com/simplerelevance/app/HelloWorld.java:[3,7] error: static import declarations are not supported in -source 1.3
  [ERROR] 
  [ERROR] (use -source 5 or higher to enable static import declarations)
  [ERROR] /home/pierceg/SR_Repos/ART2/art2_java/art2/src/main/java/com/simplerelevance/app/HelloWorld.java:[7,37] error: lambda expressions are not supported in -source 1.3
  [ERROR] -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
  </code></pre>
  
  <p>The <code>not supported in -source 1.3</code> phrasing makes me think that there is something amiss with what java version I'm using. Previously, I was getting the same error but with <code>-source 1.5</code>, so I changed $JAVA_HOME to <code>/usr/lib/jvm/java-8-oracle/jre/</code>. Is this what it should be? One of my coworkers agrees with me that the -source should be 1.8.</p>
  
  <p>Edit:
  mvn -v returns:</p>
  
  <pre><code>Apache Maven 3.0.5
  Maven home: /usr/share/maven
  Java version: 1.8.0_51, vendor: Oracle Corporation
  Java home: /usr/lib/jvm/java-8-oracle/jre
  Default locale: en_US, platform encoding: UTF-8
  OS name: "linux", version: "3.16.0-30-generic", arch: "amd64", family: "unix"
  </code></pre>