18

When runing my SBT project, there is a line in console output:

[info] downloading http://repository/nexus/content/groups/public/org/jboss/netty/netty/3.2.3.Final/netty-3.2.3.Final.jar ...
[info]  [SUCCESSFUL ] org.jboss.netty#netty;3.2.3.Final!netty.jar(bundle) (651ms)

How to find out which project dependency caused the netty.jar to be downloaded?

1 Answers1

20

This plugin should be able to help: https://github.com/jrudolph/sbt-dependency-graph/

Another way would be to turn on full debug in your build.sbt as follows:

ivyLoggingLevel := UpdateLogging.Full
logLevel := Level.Debug

and then you could parse the output of sbt update

For example, If I wanted to know where logback-core comes from in my sample project, I could run

sbt update | grep logback-core

And I would get multiple such lines, telling me that it comes with logback-classic:

[debug] == resolving dependencies ch.qos.logback#logback-classic;1.0.10->ch.qos.logback#logback-core;1.0.10 [compile->master(*)]
Jacek Laskowski
  • 72,696
  • 27
  • 242
  • 420
rompetroll
  • 4,781
  • 2
  • 37
  • 50
  • I had to add the `ivyLoggingLevel` line to `project/build.sbt` instead of `build.sbt` to examine the provenance of a transitive dependency of an sbt plugin. – dickmao Feb 20 '18 at 06:11