How to exclude commons-logging from a scala/sbt/slf4j project?

后端 未结 4 1601
囚心锁ツ
囚心锁ツ 2020-11-30 23:54

My scala/sbt project uses grizzled-slf4j and logback. A third-party dependency uses Apache Commons Logging.

With Java/Maven, I would use jcl-over-slf4j and logback-c

4条回答
  •  误落风尘
    2020-12-01 00:52

    Heiko's approach will probably work, but will lead to none of the dependencies of the 3rd party lib to be downloaded. If you only want to exclude a specific one use exclude.

    libraryDependencies += "foo" % "bar" % "0.7.0" exclude("org.baz", "bam")
    

    or

    ... excludeAll( ExclusionRule(organization = "org.baz") ) // does not work with generated poms!
    

提交回复
热议问题