我正試圖部署一個Gradle Java應用程序到heroku(基於jhipster)。我可以使用「heroku local」在本地構建和運行它,但是當我試圖遠程部署它時,當它嘗試構建應用程序時(執行./gradlew階段時)出現錯誤。錯誤是:如何在heroku部署上顯示gradle stacktrace?
...
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)傳遞給gradle這個建立在heroku遠程服務器。我會用(heroku運行bash)手動嘗試它,但我不能這樣做,因爲這是第一次部署,並且目前還沒有dyno上的代碼。
我應該注意到,您可能還需要運行'npm install bower grunt-cli --save'並將'package.json'提交給Git。 – codefinger
我有同樣的問題,但與'npm'命令。試圖在Heroku Web UI中執行此操作,但只有在@codefinger中說明您在Gradle之前添加nodejs buildpack時纔有效 – rpmartz