I am using sbt 0.12 RC2
.
My project has a bunch of library dependencies, and some of these trigger other dependencies. Some of these dependencies are unmanaged (in lib/
), some are in my local .ivy2
repository, some are found in various remote repositories.
I'm looking for an sbt update-verbose
or similar that will tell me exactly where sbt found each JAR file when it says:
[info] Resolving com.nicta#sbt-scoobi;0.0.1 ...
[info] Resolving org.scala-lang#scala-library;2.9.2 ...
[info] Resolving org.apache.opennlp#opennlp-maxent;3.0.1-incubating ...
[info] Resolving jwnl#jwnl;1.3.3 ...
All new SBT versions (after 0.7. x ) by default put the downloaded JARS into the . ivy2 directory in your home directory. If you are using Linux, this is usually /home/<username>/.
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.
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.
sbt
generates a very extensive report on how exactly the dependencies were resolved in target/resolution-cache/reports
. Open one of the .xml
files in a web browser, and you should see all the detail you need.
I'm not sure if this applies to sbt 0.12.x, but in 0.13.x, if you can find where your library lives in in the ~/.ivy/cache/...
directory structure, the library's parent directory has a file named ivydata-x.y.z.properties
which contains the URL where it found the dependency.
For example, if you cache for akka-streams
looks like this:
.ivy2
└── cache
└── com.typesafe.akka
└── akka-stream_2.11
├── docs
│ └── akka-stream_2.11-2.4.14-javadoc.jar
├── jars
│ └── akka-stream_2.11-2.4.14.jar
└── srcs
└── akka-stream_2.11-2.4.14-sources.jar
you should find a file like this, containing download URL:
.ivy2
└── cache
└── com.typesafe.akka
└── akka-stream_2.11
└──ivydata-2.4.14.properties
You can use show compile:dependency-classpath
to show where the depedencies are
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