Why does sbt provide several dependencies with Akka and ScalaTest dependencies?

I just added ScalaTest to build.sbt, so now it looks like this:

name := "appname"

version := "1.0"

scalaVersion := "2.11.7"

libraryDependencies ++= Seq(
  "com.typesafe.akka" %% "akka-actor" % "2.4.1",
  "org.scalatest" % "scalatest_2.11" % "2.2.4" % "test"
)

After that, I get a warning message:

SBT project import
         [warn] Multiple dependencies with the same organization/name but different versions. To avoid conflict, pick one version:
         [warn]  * org.scala-lang:scala-reflect:(2.11.2, 2.11.7)
         [warn]  * org.scala-lang.modules:scala-xml_2.11:(1.0.2, 1.0.4)

I also tried changing the line regarding ScalaTest to:

"org.scalatest" %% "scalatest" % "2.2.4" % "test"

but the warning is still the same as above.

How can I deal with this problem, since in my project I did not write "reflect" or "xml" anywhere. I am using the latest version of both Akka and ScalaTest and Scala version 2.11.

+4
source share
3 answers

, SBT. , libraryDependencies:

libraryDependencies ++= Seq(
  "com.typesafe.akka" %% "akka-actor" % "2.4.1",
  "org.scalatest" %% "scalatest" % "2.2.4" % "test",
  "org.scala-lang" % "scala-reflect" % "2.11.7",
  "org.scala-lang.modules" %% "scala-xml" % "1.0.4"
)
+11

ISSUE 1933, . , .

+6

The problem is fixed with sbt 0.13.12

+1
source

Source: https://habr.com/ru/post/1622546/


All Articles