title: Failed to build in Heroku for JAVA 18
body: <p>I have a working application which I have tested in Intellij, however when I try and deploy on Heroku I get the following errors:</p>
  <pre><code>      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project conference-demo: Fatal error compiling: invalid target release: 18 -&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>Does anyone have any ideas why?</p>