1

我正在运行 Scala 2.9.2 和 ScalaTest 2.0M4。我有 ScalaTest jar 的本地副本,现在想从 repo 中自动获取它。

Scalatest 网站对此进行了说明:

..is available [at] the Sonatype OSS Maven repository (which is mirrored on the central Maven repository as well):

group id: org.scalatest
artifact id: scalatest_2.9.0 (for Scala 2.9.0+)
version: 2.0.M4
Or via sbt (version 0.10 or higher) with:

libraryDependencies += "org.scalatest" %% "scalatest" % "2.0.M4" % "test"

现在,我必须在我的“project/plugins.sbt”中添加什么“解析器”才能达到这个目的?

4

1 回答 1

2

让它与这个一起工作:

project/plugins.sbt

resolvers += "SonaType" at "https://oss.sonatype.org/content/groups/public"

build.sbt

libraryDependencies += "org.scalatest" %% "scalatest" % "latest.integration" % "test"

我没有得到的是在“libraryDependencies”之后添加“in Test”不起作用,但会给出:

object scalatest is not a member of package org

好吧,我把它留在这里。如果有人知道为什么“测试中”在这里不受欢迎,请留言。谢谢。

于 2012-11-08T12:53:01.007 回答