title: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile in Spring
body: <p>I am working on a Spring security project in STS. I am trying to build my project but I am getting the following exception.
  Error log,</p>
  
  <pre><code>[INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 13.288 s
  [INFO] Finished at: 2015-11-27T09:41:59+05:30
  [INFO] Final Memory: 21M/227M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project spring-data-rest-security: Fatal error compiling: invalid target release: 1.8 -&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/MojoExecutionException
  </code></pre>
  
  <p>My pom.xml file is</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;artifactId&gt;spring-data-rest-security&lt;/artifactId&gt;
  
      &lt;name&gt;Spring Data REST - Security Example&lt;/name&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;org.springframework.data.examples&lt;/groupId&gt;
          &lt;artifactId&gt;spring-data-rest-examples&lt;/artifactId&gt;
          &lt;version&gt;1.0.0.BUILD-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;properties&gt;
          &lt;spring-security.version&gt;4.0.2.RELEASE&lt;/spring-security.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-security&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.hsqldb&lt;/groupId&gt;
              &lt;artifactId&gt;hsqldb&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>I read answers of similar issues but none of them seem to work. Kindly help me out.</p>