10

As of SBT 0.13.6, evictions are now warnings.

[warn] Scala version was updated by one of library dependencies:
[warn]  * org.scala-lang:scala-library:(2.10.4, 2.10.1, 2.10.3, 2.10.0) -> 2.10.2
[warn]  * org.scala-lang:scala-compiler:2.10.0 -> 2.10.4
[warn] To force scalaVersion, add the following:
[warn]  ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) }
[warn] There may be incompatibilities among your library dependencies.
[warn] Here are some of the libraries that were evicted:
[warn]  * org.apache.httpcomponents:httpclient:(4.1.3, [4.1, 4.2)) -> 4.0.1
[warn]  * org.specs2:specs2_2.10:(1.12.3, 2.3.13) -> 2.4.2
[warn] Run 'evicted' to see detailed eviction warnings

How can I suppress these warnings?

Paul Draper
  • 78,542
  • 46
  • 206
  • 285

1 Answers1

7

This should do it:

evictionWarningOptions in update := EvictionWarningOptions.default.withWarnTransitiveEvictions(false).withWarnDirectEvictions(false).withWarnScalaVersionEviction(false)
sksamuel
  • 16,154
  • 8
  • 60
  • 108
  • 1
    I'm not sure where to put this? Can you provide more information? – jaynp Jan 30 '15 at 07:46
  • 1
    @jpp E.g., lazy val myprj = Project(id = appName, base = file("."), settings = Seq(scalaVersion := "2.11.5", ..., evictionWarningOptions in update := EvictionWarningOptions.default.withWarnTransitiveEvictions(false).withWarnDirectEvictions(false).withWarnScalaVersionEviction(false))) – nemron Feb 07 '15 at 17:26
  • I get `error: not found: value evictionWarningOptions`. This is in a Play project, using sbt 0.13.7. – ejain Feb 12 '15 at 01:06