未解决的依赖sbt-play-ebean

时间:2018-01-09 18:19:28

标签: java playframework sbt ebean

这是我的 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")

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

我在 application.conf

中有下一行
ebean.default=["models.*"]

但我仍然收到错误

  

sbt.librarymanagement.ResolveException:未解析的依赖项:   com.typesafe.sbt#sbt-play-ebean; 3.0.0:未找到

1 个答案:

答案 0 :(得分:5)

在官方文件

addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "4.0.1")
提到了4.0.1但是如果你检查播放bean的GitHub链接,这个版本甚至不可用,最新版本是4.0.6

因此请确保您使用的是当前版本。