Questions about installing Deadbolt on Play 2.2.1

不羁岁月 提交于 2019-12-24 05:10:25

问题


  1. As stated here if I put the resolvers in plugins.sbt Play doesn't see them. But it works if I move them in build.sbt. Is there a reason?

  2. Another problem: if there isn't the file play.plugins I get this error: "**Exception:** The Deadbolt Java plugin was not registered, or is disabled. Please check your conf/play.plugins file." But it isn't written in any installation guide that play.plugins is needed to install Deadbolt (maybe it was needed for older version). source 1 source 2

In conclusion, I think there's a big confusion about Deadbolt installation. Someone could clarify?


回答1:


  1. plugins.sbt is for plugins to sbt, the build tool, so for example you would put a release plugin, or maybe a count lines of code-plugin there, build.sbt is for your actual project so stuff you want to use inside your project goes there

  2. for play to load plugins that you have made available on the classpath (either by putting them in the lib/ directory or by adding a managed dependency in you build.sbt) you must always add them to conf/play.plugins. That you need to do that is noted in the deadbolt-2 docs, altough not on the first page of the docs: https://github.com/schaloner/deadbolt-2-guide/blob/master/04-deadbolt-java-hooks.markdown



来源:https://stackoverflow.com/questions/19952470/questions-about-installing-deadbolt-on-play-2-2-1

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