I'm having a really hard time excluding logback
from my play 2.3.8 test run. I've tried many exclude rules, but nothing seems to work. I also can't find it in my dependency tree. Snippet from my sbt file:
[...]
resolvers ++= Seq(
"Typesafe repository snapshots" at "http://repo.typesafe.com/typesafe/snapshots/",
"Typesafe repository releases" at "http://repo.typesafe.com/typesafe/releases/",
"Sonatype repo" at "https://oss.sonatype.org/content/groups/scala-tools/",
"Sonatype releases" at "https://oss.sonatype.org/content/repositories/releases",
"Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
"Sonatype staging" at "http://oss.sonatype.org/content/repositories/staging",
"Java.net Maven2 Repository" at "http://download.java.net/maven/2/",
"Twitter Repository" at "http://maven.twttr.com",
"Websudos releases" at "http://maven.websudos.co.uk/ext-release-local"
)
libraryDependencies ++= {
val phantomVersion = "1.5.0"
Seq(
"net.jpountz.lz4" % "lz4" % "1.3.0",
"org.xerial.snappy" % "snappy-java" % "1.1.1.6",
"com.websudos" %% "phantom-dsl" % phantomVersion,
"com.websudos" %% "phantom-testing" % phantomVersion % Test,
"org.scalatestplus" %% "play" % "1.2.0" % Test,
"org.cassandraunit" % "cassandra-unit" % "2.1.3.1" % Test
).map(_.exclude("org.slf4j", "slf4j-jdk14"))
.map(_.excludeAll(ExclusionRule(organization = "ch.qos.logback")))
.map(_.excludeAll(ExclusionRule(organization = "QOS.ch")))
.map(_.excludeAll(ExclusionRule(artifact = "logback*")))
.map(_.excludeAll(ExclusionRule(artifact = "logback-classic")))
.map(_.exclude("ch.qos.logback", "logback-parent"))
.map(_.exclude("ch.qos.logback", "logback-core"))
.map(_.exclude("QOS.ch", "logback-parent"))
.map(_.exclude("", "logback-classic"))
}
It's not in the dependency tree for some reason:
$ activator "inspect tree test" |grep -i qos |wc -l
0
$ activator "inspect tree test" |grep -i logback |wc -l
0
Yet, when I run the test, it shows up!
$ activator test
[...]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/X/.ivy2/cache/ch.qos.logback/logback-classic/jars/logback-classic-1.1.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/X/.ivy2/cache/org.slf4j/slf4j-log4j12/jars/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
I'm at my wits' end. Help.