Failed to build app with Maven, I can run code locally, but fail to deploy on heroku

This is my code in github: I can run it successfully in the local, but while I try to deploy the code on heroku, There is the error description:

       [INFO] Downloaded from central: (317 kB at 6.0 MB/s)
       [INFO] Changes detected - recompiling the module!
       [INFO] Compiling 4 source files to /tmp/build_3c4f3b86a26f6e3ae1cbe89639f79f26/target/classes
       [INFO] ------------------------------------------------------------------------
       [INFO] ------------------------------------------------------------------------
       [INFO] Total time: 13.261 s
       [INFO] Finished at: 2019-01-24T00:47:07Z
       [INFO] ------------------------------------------------------------------------
       [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project myapp: Fatal error compiling: invalid target release: 11 -> [Help 1]
       [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] For more information about the errors and possible solutions, please read the following articles:
       [ERROR] [Help 1]
 !     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:
 !     Push rejected, failed to compile Java app.
 !     Push failed

#java #maven

3 Likes70.55 GEEK