【问题标题】:I am deploying a simple spring boot app bu it is showing this error我正在部署一个简单的 Spring Boot 应用程序,但它显示此错误
【发布时间】:2021-10-30 07:45:17
【问题描述】:

我对此一无所知,我也尝试将其版本更改为 11 但它不起作用

       [INFO] BUILD FAILURE
       [INFO] ------------------------------------------------------------------------
       [INFO] Total time:  14.098 s
       [INFO] Finished at: 2021-08-31T17:21:13Z
       [INFO] ------------------------------------------------------------------------
       [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project chatroom: Fatal error compiling: invalid target release: 16 -> [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

提前致谢

【问题讨论】:

  • 查看this article中的第一段
  • 您为 java 16 配置了构建,但可用的 JDK 为
  • 请提供足够的代码,以便其他人更好地理解或重现问题。

标签: spring-boot heroku websocket


【解决方案1】:

确保已安装的 jdk 版本为 16(或更高),并在开发环境中检查您的项目是否也配置了此版本。

目标版本无效:16

【讨论】:

  • 请添加更多详细信息以扩展您的答案,例如工作代码或文档引用。
猜你喜欢
  • 2022-10-16
  • 2021-08-06
  • 2020-07-06
  • 1970-01-01
  • 2021-02-08
  • 1970-01-01
  • 1970-01-01
  • 2021-08-23
  • 2017-09-30
相关资源
最近更新 更多