Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot 使用Gradle(Kotlin)应用程序部署Spring引导-找不到jar_Spring Boot_Heroku_Gradle_Kotlin - Fatal编程技术网

Spring boot 使用Gradle(Kotlin)应用程序部署Spring引导-找不到jar

Spring boot 使用Gradle(Kotlin)应用程序部署Spring引导-找不到jar,spring-boot,heroku,gradle,kotlin,Spring Boot,Heroku,Gradle,Kotlin,我有一个简单的应用程序在SpringBoot,Kotlin,Gradle制作。我遵循并尝试遵循所有可能的默认设置 $ git push heroku master Counting objects: 2, done. Delta compression using up to 4 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (2/2), 231 bytes | 231.00 KiB/s, done.

我有一个简单的应用程序在SpringBoot,Kotlin,Gradle制作。我遵循并尝试遵循所有可能的默认设置

$ git push heroku master
Counting objects: 2, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 231 bytes | 231.00 KiB/s, done.
Total 2 (delta 1), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> JVM Common app detected
remote: -----> Installing JDK 1.8... done
remote: -----> Discovering process types
remote:        Procfile declares types -> (none)
remote:
remote: -----> Compressing...
remote:        Done: 50.7M
remote: -----> Launching...
remote:        Released v50
remote:        https://---.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
奇怪的是,我得到的是“检测到JVM公共应用程序”,而不是“检测到Gradle应用程序”

我无法部署该应用程序。当我执行heroku日志--tail时,我得到:

2018-04-02T23:02:39.257887+00:00 heroku[web.1]: Starting process with command `java $JAVA_OPTS -Dserver.port=50478 -jar build/libs/scraper-0.0.1-SNAPSHOT.jar`
2018-04-02T23:02:41.645544+00:00 heroku[web.1]: Process exited with status 1
2018-04-02T23:02:41.664910+00:00 heroku[web.1]: State changed from starting to crashed
2018-04-02T23:02:41.577966+00:00 app[web.1]: Error: Unable to access jarfile build/libs/scraper-0.0.1-SNAPSHOT.jar
2018-04-02T23:02:41.572483+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2018-04-02T23:05:10.000000+00:00 app[api]: Build started by user ---
2018-04-02T23:05:21.108667+00:00 app[api]: Release v50 created by user ---
2018-04-02T23:05:10.000000+00:00 app[api]: Build succeeded
2018-04-02T23:05:21.635834+00:00 heroku[web.1]: State changed from crashed to down
  • 使用Spring Boot 2.0.0.0版本
  • 使用Kotlin 1.2.31
  • build.gradle中没有特殊任务
  • Procfile

是否有任何方法可以使用默认值(即没有Procfile,没有特殊的Gradle任务)来修复此问题?如果无法使用默认值,我可以做什么?谢谢

您确实应该(至少)得到以下信息:

remote: -----> Gradle app detected
remote: -----> Spring Boot detected

这是你第一次推吗?您是否手动设置了构建包?也许可以尝试清除构建包(heroku buildpacks:clear)。如果你可以在某个地方发布你的应用程序,检查问题可能会有帮助。

你确实应该(至少)得到以下信息:

remote: -----> Gradle app detected
remote: -----> Spring Boot detected
这是你第一次推吗?您是否手动设置了构建包?也许可以尝试清除构建包(heroku buildpacks:clear)。如果你可以在某个地方发布你的应用程序,那么检查问题可能会有帮助