I've started a play framework project, using console. All was built seemingly OK.
My project/plugins.sbt
file is
// The Play plugin addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.6") // Web plugins addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0") addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.0.6") addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.3") addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.7") addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.1.0") addSbtPlugin("com.typesafe.sbt" % "sbt-mocha" % "1.1.0") // Play enhancer - this automatically generates getters/setters for public fields // and rewrites accessors of these fields to use the getters/setters. Remove this // plugin if you prefer not to have this feature, or disable on a per project // basis using disablePlugins(PlayEnhancer) in your build.sbt addSbtPlugin("com.typesafe.sbt" % "sbt-play-enhancer" % "1.1.0") // Play Ebean support, to enable, uncomment this line, and enable in your build.sbt using // enablePlugins(PlayEbean). Note, uncommenting this line will automatically bring in // Play enhancer, regardless of whether the line above is commented out or not. addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "1.0.0") addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")
I uncommented the line before the last as an attempt to make ebean work.
and my build.sbt
file is
name := """whatever""" version := "1.0-SNAPSHOT" lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayEbean) scalaVersion := "2.11.6" libraryDependencies ++= Seq( javaJdbc, cache, javaWs ) // Play provides two styles of routers, one expects its actions to be injected, the // other, legacy style, accesses its actions statically. routesGenerator := InjectedRoutesGenerator fork in run := true
Where, on
lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayEbean)
On my conf/application.conf
I have already added the DB connections strings and defined where ebean should default to.
db.default.driver=com.mysql.jdbc.Driver db.default.url="jdbc:mysql://localhost/whatever?characterEncoding=UTF-8" db.default.user=whatever db.default.password=whateverUser ebean.default="models.*"
I added the 'PlayEbean' part.
On the activator console, I do clean, compile, eclipse. Remove the project from eclipse and re-import it.
When I try to start using this 'high-productivity' framework I get stuck on the first model I'm trying to build.
What am I getting wrong here?
Thanks in advance!
play.db.ebean.Model
should becom.avaje.ebean.Model
. – Roman