Using SORM with Play Framework 2.3.8
Asked Answered
P

2

6

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.

Plumcot answered 27/2, 2015 at 7:29 Comment(2)
should be add as libraryDependencies += "org.sorm-framework" % "sorm" % "0.3.16" in build.sbt, but not an sbt pluginPhilanthropist
Thanks! Eclipse was having troubles to recognize the import and that was confusing me even more, but now it works. If you convert your comment into an answer, I will mark it as the correct one.Plumcot
P
9

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

Philanthropist answered 2/3, 2015 at 6:10 Comment(0)
G
3

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)).

Godchild answered 26/1, 2016 at 23:2 Comment(1)
Re-running SBT fixed my issue. Thanks.Charlesettacharleston

© 2022 - 2024 — McMap. All rights reserved.