Using SORM with Play Framework 2.3.8

一曲冷凌霜 提交于 2019-12-07 02:32:24

问题


I am going through the Video introduction to Play Framework and, but I am stuck creating a DB object with SORM because the import fails.

I tried to add the dependencies in plugins.sbt, and relaunched activator, but it seems that activator cannot find the dependencies and I get and I get an unresolved error:

addSbtPlugin("org.sorm-framework" % "sorm" % "0.3.14")
addSbtPlugin("com.h2database" % "h2" % "1.4.181")

I got the versions from the Yvis repository. I also tried other versions with no better luck.


回答1:


should be add as

libraryDependencies += "org.sorm-framework" % "sorm" % "0.3.16" 

in build.sbt,

but not as

addSbtPlugin("org.sorm-framework" % "sorm" % "0.3.14")

in project/plugins.sbt




回答2:


good answer by jilen; also, it can be a good idea to re-run sbt after changing the build.sbt, e.g. (in project root dir):

$ sbt
....
$ compile
...
$ eclipse

(the last two apply to Eclipse users more - and then restart Eclipse to make sure the changes are picked up (Refresh/Clean may not be enough)).



来源:https://stackoverflow.com/questions/28759698/using-sorm-with-play-framework-2-3-8

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