Reputation:
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?
Upvotes: 18
Views: 4409
Reputation: 4799
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(*)]
Upvotes: 20