Jars in lib folder not picked up when deploying play application on Heroku

风流意气都作罢 提交于 2019-12-12 01:36:44

问题


I have built an application based on play framework 2.0.3. I have placed some jars in lib folder (unmanaged dependencies) which are used in my application like suggested in How to put a JAR file in a Play 2 project and use it?

All is fine when I run it from my local machine with play run

But when this application is deployed to Heroku, these jars are not picked up. I get compilation errors where these jars are used.

I even tried adding dependencies.yml with below content

require:
    - play 2.0.3
    - provided -> myjar 1.0

repositories:
  - provided:
      type:       local
      artifact:   "${application.path}/lib/[module]-[revision].jar"
      contains:
        - provided -> *

But still it didn't work.

My Start script (Procfile) is :

web: target/start -Dhttp.port=${PORT} ${JAVA_OPTS} -DapplyEvolutions.default=true -Ddb.default.driver=org.postgresql.Driver -Ddb.default.url=${DATABASE_URL}

Can somebody throw some light on this problem ?


回答1:


Since heroku uses git, make sure that you lib folder and all contained jars are properly managed by git, ie that they are not in your .gitignore file.



来源:https://stackoverflow.com/questions/12054118/jars-in-lib-folder-not-picked-up-when-deploying-play-application-on-heroku

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!