title: Fatal error compiling: invalid target release: 11 during pushing to heroku
body: <p>im trying to deploy my back end application to heroku
  bun when I run this command</p>
  <pre><code>git push --force heroku-be-app splitting-staging-be:master
  </code></pre>
  <p>im getting this error</p>
  <pre><code>       [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/com/thoughtworks/qdox/qdox/2.0-M9/qdox-2.0-M9.jar (317 kB at 7.6 MB/s)
         [INFO] Changes detected - recompiling the module!
         [INFO] Compiling 24 source files to /tmp/build_4e875976/target/classes
         [INFO] ------------------------------------------------------------------------
         [INFO] BUILD FAILURE
         [INFO] ------------------------------------------------------------------------
         [INFO] Total time:  12.593 s
         [INFO] Finished at: 2020-12-21T15:28:14Z
         [INFO] ------------------------------------------------------------------------
         [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project backend: Fatal error compiling: invalid target release: 11 -&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
   !     ERROR: Failed to build app with Maven
         We're sorry this build is failing! If you can't find the issue in application code,
         please submit a ticket so we can help: https://help.heroku.com/
   !     Push rejected, failed to compile Java app.
   !     Push failed
  </code></pre>
  <p>This is my pom file:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
      xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;2.4.0&lt;/version&gt;
          &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
      &lt;/parent&gt;
      &lt;groupId&gt;vs&lt;/groupId&gt;
      &lt;artifactId&gt;backend&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
      &lt;name&gt;backend&lt;/name&gt;
      &lt;description&gt;Main server voor van streek project&lt;/description&gt;
  
      &lt;properties&gt;
          &lt;java.version&gt;15&lt;/java.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-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-devtools&lt;/artifactId&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
              &lt;optional&gt;true&lt;/optional&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.h2database&lt;/groupId&gt;
              &lt;artifactId&gt;h2&lt;/artifactId&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
        &lt;artifactId&gt;spring-security-core&lt;/artifactId&gt;
        &lt;version&gt;5.4.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.springframework&lt;/groupId&gt;
        &lt;artifactId&gt;spring-context-support&lt;/artifactId&gt;
        &lt;version&gt;5.3.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;com.sun.mail&lt;/groupId&gt;
        &lt;artifactId&gt;jakarta.mail&lt;/artifactId&gt;
        &lt;version&gt;1.6.5&lt;/version&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
              &lt;/plugin&gt;
              &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.8.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;15&lt;/source&gt;   &lt;!-- maven.compiler.source  --&gt;
                      &lt;target&gt;15&lt;/target&gt; &lt;!-- maven.compiler.target --&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  &lt;/project&gt;
  </code></pre>