You should have
libraryDependencies ++= Seq(
"org.specs2" %% "specs2" % "2.3.11" % "test",
"org.scalatest" %% "scalatest" % "2.1.5" % "test"
)
in your libraryDependencies
(note the removed _2.11
).
The reason is that %%
will append a correct suffix for you, depending on the Scala version you're using. You can read more in Getting the right Scala version with %%.
If you use groupID %% artifactID % revision rather than groupID % artifactID % revision (the difference is the double %% after the groupID), sbt will add your project's Scala version to the artifact name. This is just a shortcut.
The reason for it are publishing conventions, via SBT documentation:
The underlying mechanism used to indicate which version of Scala a library was compiled against is to append _ to the library's name. For Scala 2.10.0 and later, the binary version is used. For example, dispatch becomes dispatch_2.8.1 for the variant compiled against Scala 2.8.1 and dispatch_2.10 when compiled against 2.10.0, 2.10.0-M1 or any 2.10.x version. This fairly simple approach allows interoperability with users of Maven, Ant and other build tools.
You have added a Scala version yourself and SBT appended one extra, so your artifact name became scalatest_2.11_2.10
, which doesn't exist - hence the error.