问题
As stated here if I put the resolvers in
plugins.sbt
Play doesn't see them. But it works if I move them inbuild.sbt
. Is there a reason?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 thatplay.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:
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
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