【发布时间】:2015-02-27 04:56:08
【问题描述】:
我正在学习如何使用 Heroku,并且正在尝试部署我的 gradle 应用程序。我不知道如何解决这个问题。
这是我的配置。
system.properties
java.runtime.version=1.7
build.gradle
...
task wrapper(type: Wrapper) {
gradleVersion = '1.6'
}
task stage(type: Copy, dependsOn: [clean, build]) {
from jar.archivePath
into project.rootDir
rename {
'app.jar'
}
}
stage.mustRunAfter(clean)
clean << {
project.file('app.jar').delete()
}
过程文件
web: java -Dserver.port=$PORT -jar app.jar
错误信息
remote: -----> Gradle app detected
remote: -----> Installing OpenJDK 1.7... done
remote: -----> Building Gradle app...
remote: WARNING: The Gradle buildpack is currently in Beta.
remote: -----> executing ./gradlew stage
remote: Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
remote: ! Failed to build app
remote:
remote: ! Push rejected, failed to compile Gradle app
我在 git 中有包装器。 我不知道为什么它不起作用。 感谢您的帮助。
【问题讨论】:
-
这似乎就在这个网站的开/关主题的边缘。
-
我确认您已将 gradle/wrapper/gradle-wrapper.jar 签入到您的项目中。
-
你是对的。没想到我的全局 gitignore 上面有 .jar。谢谢!
-
试试this link,看看能不能帮到你。
-
我很确定它正在部署,但仍然出现同样的错误......