title: Java Error - lambda expressions are not supported in -source 1.5 (use -source 8 or higher to enable lambda expressions)
body: <p>I am trying to build a Kafka Streams Application that uses lambda expressions.</p>
  
  <p>My maven build configuration is <em>mvn clean install</em></p>
  
  <p>When I do RunAs > Maven build, I get the following error:</p>
  
  <pre><code>[ERROR] COMPILATION ERROR : 
  [INFO] -------------------------------------------------------------
  [ERROR] /home/junaid/eMumba/StreamsExample/streams.examples/src/main/java/myapps/Pipe.java:[53,38] lambda expressions are not supported in -source 1.5
    (use -source 8 or higher to enable lambda expressions)
  [INFO] 1 error
  [INFO] -------------------------------------------------------------
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 2.265 s
  [INFO] Finished at: 2018-02-24T14:50:04+05:00
  [INFO] Final Memory: 11M/150M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project streams.examples: Compilation failure
  [ERROR] /home/junaid/eMumba/StreamsExample/streams.examples/src/main/java/myapps/Pipe.java:[53,38] lambda expressions are not supported in -source 1.5
  [ERROR] (use -source 8 or higher to enable lambda expressions)
  </code></pre>
  
  <p>In <code>Java Build Path</code> I have <code>JRE System Library [JavaSE 1.8]</code>.</p>
  
  <p>In <code>Preferences &gt; Java &gt; Installed JREs</code> I have <code>java-8-openjdk</code></p>
  
  <p>This is my <strong>pom.xml</strong>:</p>
  
  <p>I have added the org.apache.maven.plugins: maven-compiler-plugin dependency at the end.</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/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;streamsexamples&lt;/groupId&gt;
      &lt;artifactId&gt;streams.examples&lt;/artifactId&gt;
      &lt;version&gt;0.1&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
  
      &lt;name&gt;Kafka Streams Quickstart :: Java&lt;/name&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;kafka.version&gt;1.0.0&lt;/kafka.version&gt;
          &lt;slf4j.version&gt;1.7.7&lt;/slf4j.version&gt;
          &lt;log4j.version&gt;1.2.17&lt;/log4j.version&gt;
      &lt;/properties&gt;
  
      &lt;!-- Execute "mvn clean package -Pbuild-jar" to build a jar file out of 
          this project! --&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;copy-dependencies&lt;/id&gt;
                          &lt;phase&gt;prepare-package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;copy-dependencies&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;outputDirectory&gt;
                                  ${project.build.directory}/libs
                              &lt;/outputDirectory&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.0.2&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;archive&gt;
                          &lt;manifest&gt;
                              &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                              &lt;classpathPrefix&gt;libs/&lt;/classpathPrefix&gt;
                              &lt;mainClass&gt;
                                  myapps.Pipe
                              &lt;/mainClass&gt;
                          &lt;/manifest&gt;
                      &lt;/archive&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;dependencies&gt;
          &lt;!-- Apache Kafka dependencies --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.kafka&lt;/groupId&gt;
              &lt;artifactId&gt;kafka-streams&lt;/artifactId&gt;
              &lt;version&gt;${kafka.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/org.json/json --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.json&lt;/groupId&gt;
              &lt;artifactId&gt;json&lt;/artifactId&gt;
              &lt;version&gt;20180130&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.1&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>What can I do to resolve this?</p>