java如何在heroku部署上显示gradle stacktrace?
我正在尝试将GradleJava应用程序部署到heroku(基于jhipster)。我可以使用“heroku local”在本地构建和运行它,但是当我尝试远程部署它时,当它尝试构建应用程序时(在执行./gradlew stage时),我会得到一个错误。错误是:
...
remote: Download https://oss.sonatype.org/content/repositories/releases/org/mapstruct/mapstruct-processor/1.0.0.CR1/mapstruct-processor-1.0.0.CR1.pom
remote: Download https://oss.sonatype.org/content/repositories/releases/org/mapstruct/mapstruct-processor/1.0.0.CR1/mapstruct-processor-1.0.0.CR1.jar
remote: :bower FAILED
remote: FAILURE: Build failed with an exception.
remote:
remote: * What went wrong:
remote: Execution failed for task ':bower'.
remote: > A problem occurred starting process 'command 'bower''
remote:
remote: * Try:
remote: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
remote:
remote: BUILD FAILED
我想如果我能看到stacktrace,它可能会澄清问题,但我不知道如何将命令行参数(--stacktrace)传递给heroku远程服务器上的gradle构建。我会用(heroku run bash)手动尝试,但我不能,因为这是第一次部署,而且dyno上还没有代码
# 1 楼答案
您还可以使用heroku deploy plugin部署到Heroku
# 2 楼答案
此错误意味着
bower
命令不可用。为了将其添加到构建中,您需要添加节点。通过运行以下命令将js buildpack添加到您的应用程序:这将运行该节点。js buildpack首先(在
git push
之后),它将在package.json
中安装节点和任何依赖项。然后它将运行Gradle构建包您可能还需要配置其他一些东西,我有一个blog post on doing this with Maven。但一般来说,同样的原则也适用于格拉德尔