3

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

argentonik
  • 39
  • 3
  • 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 repo](https://bintray.com/playframework/sbt-plugin-releases/play-ebean) – Luca T. Jan 09 '18 at 21:32
  • @LucaT. thanks, it helped me – argentonik Jan 10 '18 at 13:04

1 Answers1

5

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.

defcon
  • 123
  • 7
  • I am also facing same problem with following configuration. addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.0") addSbtPlugin("com.typesafe.sbt" % "sbt-play-enhancer" % "1.2.2") addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "5.0.2") – surendrapanday Jul 07 '20 at 12:55