1

Не могу задеплоить приложение на heroku, деплоить пытаюсь с помощью heroku cli.

создаю git init дальше логинюсь в heroku : heroku login git add . git commit -m "comment" git push heroku master База данных на сайте heroku подключена p.s При запуске приложения на localhost, все отлично взлетает. Ошибка выдается после команды git push heroku master [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project Pet: Fatal error compiling: invalid target release: 11 -> [Help 1]

Полный код ошибки:

remote:        [INFO] Changes detected - recompiling the module!
remote:        [INFO] Compiling 14 source files to /tmp/build_9d475cefb6aba75f42ef04bc988c4107/target/classes
remote:        [INFO] ------------------------------------------------------------------------
remote:        [INFO] BUILD FAILURE
remote:        [INFO] ------------------------------------------------------------------------
remote:        [INFO] Total time:  13.323 s
remote:        [INFO] Finished at: 2020-01-23T08:41:48Z
remote:        [INFO] ------------------------------------------------------------------------
remote:        [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project Pet: Fatal error compiling: invalid target release: 11 -> [Help 1]
remote:        [ERROR]
remote:        [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
remote:        [ERROR] Re-run Maven using the -X switch to enable full debug logging.
remote:        [ERROR]
remote:        [ERROR] For more information about the errors and possible solutions, please read the following articles:
remote:        [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
remote:
remote:  !     ERROR: Failed to build app with Maven
remote:        We're sorry this build is failing! If you can't find the issue in application code,
remote:        please submit a ticket so we can help: https://help.heroku.com/
remote:
remote:  !     Push rejected, failed to compile Java app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to milliapp.
remote:
To https://git.heroku.com/milliapp.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/milliapp.git'

Ссылка на приложение на гите

2 ответа 2

1

Тоже столкнулся с такой проблемой. Решил её добавив файл system.properties с таким кодом:

java.runtime.version=11
-1

такое же вылезало, удалось решить добавив в pom.xml

<properties>
    <java.version>1.8</java.version>
</properties>

там подробнее описано, что к чему https://stackoverflow.com/questions/28291691/fatal-error-compiling-invalid-target-release-1-8-help-1

0

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.