I'm trying to get an executable Spring Boot jar to deploy on Heroku.
I have told Heroku to deploy from a github repository that contains only these files:
.
├── Procfile
└── current/
└── <my application>.jar
My Procfile
looks like this:
web: java $JAVA_OPTS -Dserver.port=$PORT -jar current/*.jar
This is the error I get in the Heroku build log when I try to deploy:
-----> Failed to detect app matching no buildpack
More info: https://devcenter.heroku.com/articles/buildpacks#detection-
failure
! Push failed
If I look at the heroku/java
build pack project in github, I can see that there's a script called detect
that checks for the existence of a pom.xml
file:
https://github.com/heroku/heroku-buildpack-java/blob/master/bin/detect
I believe my project isn't being deployed because I don't have a pom in the root directory.
Is it possible to just deploy a project that contains only an executable jar and a Procfile?
You'll want to use the JVM buildpack instead, which you can do by setting the heroku/jvm
buildpack on the app instead of the heroku/java
buildpack.
For example, you can run:
$ heroku buildpacks:set heroku/jvm
Or set it in the Heroku Dashboard's Settings tab for the app
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.