Scala playframework为什么不导入库
我正试着用它。但我在尝试导入库时被卡住了Scala playframework为什么不导入库,scala,testing,playframework,Scala,Testing,Playframework,我正试着用它。但我在尝试导入库时被卡住了 import org.scalatestplus.play._ 我在build.sbt中添加了此依赖项 libraryDependencies += "org.scalatestplus" % "play_2.10" % "1.2.0" 它不会更新依赖项列表 如果我尝试激活器更新,我会成功 $ activator update [info] Loading project definition from /Users/masum/work/ap
import org.scalatestplus.play._
我在build.sbt中添加了此依赖项
libraryDependencies += "org.scalatestplus" % "play_2.10" % "1.2.0"
它不会更新依赖项列表
如果我尝试激活器更新,我会成功
$ activator update
[info] Loading project definition from /Users/masum/work/app/project
[info] Set current project to app (in build file:/Users/masum/work/app/)
[info] Updating {file:/Users/masum/work/app/}root...
[info] Resolving jline#jline;2.12 ...
[info] downloading http://repo1.maven.org/maven2/org/scalatestplus/play_2.11/1.2.0/play_2.11-1.2.0.jar ...
[info] [SUCCESSFUL ] org.scalatestplus#play_2.11;1.2.0!play_2.11.jar (1253ms)
[info] Done updating.
[success] Total time: 6 s, completed Mar 3, 2015 5:50:21 PM
即使在那之后,我也不能
import org.scalatestplus.play._
这是我的build.sbt:-
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.11.5"
libraryDependencies += "org.scalatestplus" % "play_2.11" % "1.2.0" % "test"
libraryDependencies ++= Seq(
jdbc,
anorm,
cache,
ws,
"com.typesafe.slick" % "slick_2.11" % "3.0.0-M1",
"com.typesafe.play" % "play-slick_2.11" % "0.8.1",
"org.slf4j" % "slf4j-nop" % "1.6.4",
"org.postgresql" % "postgresql" % "9.4-1200-jdbc41",
"org.scalatest" % "scalatest_2.11" % "2.2.4" % "test",
"org.mockito" % "mockito-core" % "1.10.19" % "test",
"com.h2database" % "h2" % "1.3.166",
"org.xerial" % "sqlite-jdbc" % "3.6.20",
"org.scala-lang" % "scala-actors" % "2.11.0"
)
怎么了?如何导入org.scalatestplus.play.\u
使用测试代码更新更多信息
我发现scalatestplus游戏中存在问题。检查@ 我在使用时为我工作
"org.scalatestplus" %% "play" % "1.2.0" % "test"
感谢所有支持我的人 单独添加测试依赖项有什么具体原因吗?您想在哪里执行导入?REPL、src/main或src/test?实际抛出的错误是什么?当您通过test:compile编译测试时会发生什么情况?@singhakash我在Seq中尝试过。。而在这两种方式之外,结果是一样的。就在问问题的时候,它仍然在外面。@JustinPihony我正在一个play2.0web应用程序中尝试。所以它位于app/test/directory中
"org.scalatestplus" %% "play" % "1.2.0" % "test"