I have a repository on GitHub. It consists of 3 projects. Main web application and libraries. Main application is jar with embedded Tomcat. I would like to deploy main application on Heroku. Can I deploy just prepared jar? If so how?
Asked
Active
Viewed 2,091 times
1 Answers
2
While it is not recommended to check in binary files (e.g. JARs) into a Git repo, you can try using the third-party Null Buildpack to have Heroku just deploy your repo as-is without compilation. You'll still need to have a Procfile to tell Heroku how to launch your application.
Besides the problems with checking in JARs, this method will also not be running your application on the latest patch JDK. If you want the best of both worlds, you'd need to make your own custom buildpack that downloads the JDK, similar to what the Java Buildpack does.

ryanbrainard
- 5,918
- 35
- 41
-
Has anyone actually made the buildpack suggested in the answer? – Tim Schimandle Jul 25 '16 at 01:25
-
This answer is old. Check out https://devcenter.heroku.com/articles/deploying-executable-jar-files – ryanbrainard Jul 25 '16 at 06:13