首页 > 解决方案 > jar依赖中的权限被拒绝heroku错误

问题描述

我正在尝试将 Java Web 应用程序部署到 Heroku,但在我的一个依赖项“aether-api-1.7.jar”中出现权限被拒绝错误。我已经添加了一个 realease 命令来防止这个错误,但它仍然存在。

档案:

release: chmod u+x target/dependency/aether-api-1.7.jar
web: java -Dserver.port=$PORT -cp target/classes;target/dependency/* Server

Heroku 日志:

2019-11-17T06:10:24.922962+00:00 app[web.1]: See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
2019-11-17T06:10:24.934033+00:00 app[web.1]: bash: target/dependency/aether-api-1.7.jar: Permission denied
2019-11-17T06:10:24.987470+00:00 heroku[web.1]: Process exited with status 126

标签: javaherokudeployment

解决方案


Change the ; in your Procfile to :. The ; is causing the rest of the command to be treated as a different command.

The release command can't modify your files.


推荐阅读