How would you exclude a transitive dependency globally? My project depends on a lot of the Twitter libraries or on libraries that depend on the Twitter libraries. I don't want slf4j-jdk14
in my classpath, no matter what (I use logback as slf4j binding).
Currently I do this:
"com.twitter" %% "finagle-thriftmux" % "6.16.0" exclude("org.slf4j", "slf4j-jdk14")
but every time someone adds another dependency that uses slf4j-jdk14
I might get it back into the classpath.
The libraryDependencies key Most of the time, you can simply list your dependencies in the setting libraryDependencies . It's also possible to write a Maven POM file or Ivy configuration file to externally configure your dependencies, and have sbt use those external configuration files.
Apache Ivy is a transitive package manager. It is a sub-project of the Apache Ant project, with which Ivy works to resolve project dependencies. An external XML file defines project dependencies and lists the resources necessary to build a project.
If you have JAR files (unmanaged dependencies) that you want to use in your project, simply copy them to the lib folder in the root directory of your SBT project, and SBT will find them automatically.
These tools support automatic dependency management for your project. Like in almost every build system, SBT allows you to define library dependencies which are resolved automatically, so you don't have to download and package required libraries by yourself.
excludeDependencies += "org.slf4j" % "slf4j-jdk14"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With