【问题标题】:Heroku Deploying Java (MAVEN) [duplicate]Heroku部署Java(MAVEN)[重复]
【发布时间】:2021-10-20 05:41:51
【问题描述】:
       [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 9.9 MB/s)
       [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-javac/2.8.4/plexus-compiler-javac-2.8.4.jar (21 kB at 734 kB/s)
       [INFO] Changes detected - recompiling the module!
       [INFO] Compiling 9 source files to /tmp/build_18ad8db2/target/classes
       [INFO] ------------------------------------------------------------------------
       [INFO] BUILD FAILURE
       [INFO] ------------------------------------------------------------------------
       [INFO] Total time:  14.502 s
       [INFO] Finished at: 2021-08-18T12:06:15Z
       [INFO] ------------------------------------------------------------------------
       [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project E-commerce: Fatal error compiling: invalid target release: 10 -> [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

源代码如下,你认为可能是什么问题?

https://github.com/furkannzmnn/ders

【问题讨论】:

    标签: java spring maven heroku


    【解决方案1】:

    尝试在包含该行的项目根目录中添加一个名为system.properties的文件

    java.runtime.version=11
    

    堆栈跟踪表明您的目标版本无效:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project E-commerce: Fatal error compiling: invalid target release: 10 -> [Help 1]
    

    Heroku 确实不支持 java 10 作为运行时版本,请参阅here

    【讨论】:

    • 不工作...
    • @KenanKaraman 至少您的 github 存储库没有该文件。你还记得提交并推送文件吗?
    • 是的,不工作
    猜你喜欢
    • 2022-01-17
    • 2020-11-29
    • 2019-05-05
    • 2016-12-12
    • 1970-01-01
    • 2023-03-20
    • 2012-12-31
    • 1970-01-01
    • 2021-01-09
    相关资源
    最近更新 更多