(Disclaimer: I'm a complete Play/SBT newbie.) I've been trying to create a new project across two sub-modules using play for a web front-end (the "app" module) and plain scala for the core module ("core"). However, I've been running into problems where trying to run sbt:
[info] Loading project definition from /home/rm/PlayApp/project Play ebean module has been replaced with an external Play ebean plugin. See https://playframework.com/documentation/2.4.x/Migration24 for details.
I've looked at the migration guide, and it doesn't seem to help much. It doesn't seem to me that ebeans is required to use Play!, but sbt doesn't seem to want to run without it. Furthermore, even when I add ebeans as a sbt plugin, it still has problems.
project/Build.scala
import org.scalajs.sbtplugin.ScalaJSPlugin
import play.sbt.PlayScala
import sbt.{Build => SbtBuild, _}
import Keys._
object BuildSettings {
val buildSettings = Defaults.coreDefaultSettings ++ Seq(
scalaVersion := "2.11.7",
version := "1.0.0",
resolvers += Resolver.sonatypeRepo("releases"),
resolvers += Resolver.url("scalajs-repo", new java.net.URL("http://mvnrepository.com/artifact/org.scala-js")),
scalacOptions ++= Seq()
)
}
object Dependencies {
val playjson = "com.typesafe.play" %% "play-json" % "2.4.3"
}
object Build extends SbtBuild {
import BuildSettings._
import Dependencies._
lazy val root = Project(id = "Application",
base = file("."),
settings = buildSettings ++ Seq(
run <<= run in Compile in core
)
).aggregate(core)
lazy val core = Project("core",
file("core"),
settings = buildSettings
)
lazy val app = Project("app",
file("app"),
settings = buildSettings ++ Seq(
libraryDependencies ++= Seq(
playjson
)
)
).enablePlugins(PlayScala, ScalaJSPlugin)
}
project/plugins.sbt
logLevel := Level.Warn
addSbtPlugin("com.typesafe.play" %% "sbt-plugin" % "2.4.3")
addSbtPlugin("org.scala-js" %% "sbt-scalajs" % "0.6.5")