3
votes

Here is my plugins.sbt

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.9")
addSbtPlugin("com.typesafe.sbt" % "sbt-play-enhancer" % "1.2.2")
addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "3.0.0")

and build.sbt

name := """play-java-starter-example"""

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayEbean)

scalaVersion := "2.12.2"

libraryDependencies ++= Seq(
  javaJdbc,
  cache,
  javaWs, 
  javaEbean, 
  evolutions
)

libraryDependencies += guice


// Test Database
libraryDependencies += "com.h2database" % "h2" % "1.4.194"

// Testing libraries for dealing with CompletionStage...
libraryDependencies += "org.assertj" % "assertj-core" % "3.6.2" % Test
libraryDependencies += "org.awaitility" % "awaitility" % "2.0.0" % Test


// Make verbose tests
testOptions in Test := Seq(Tests.Argument(TestFrameworks.JUnit, "-a", "-v"))

and I have next line in application.conf

ebean.default=["models.*"]

but I still get an error

sbt.librarymanagement.ResolveException: unresolved dependency: com.typesafe.sbt#sbt-play-ebean;3.0.0: not found

1
which version of sbt are you using? "sbt-play-ebean" % "3.0.0" is available for sbt 0.13.x, while if you are using sbt 1.0.x you need "sbt-play-ebean" % "4.x.y". For reference bintray repoLuca T.
@LucaT. thanks, it helped meargentonik

1 Answers

5
votes

On the official documentation

addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "4.0.1")

4.0.1 is mentioned but if you check the GitHub link for play beans, this version is not even available, the latest version is 4.0.6

So make sure that you are using the currently available version.