运行我的SBT项目时,控制台输出中有一行:
[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)
如何找出导致netty.jar下载的项目依赖项?
答案 0 :(得分:17)
此插件应该可以提供帮助:https://github.com/jrudolph/sbt-dependency-graph/
另一种方法是在build.sbt
中启用完整调试,如下所示:
ivyLoggingLevel := UpdateLogging.Full
logLevel := Level.Debug
然后你可以解析sbt update
例如,如果我想知道示例项目中logback-core
的来源,我可以运行
sbt update | grep logback-core
我会得到多个这样的行,告诉我它带有logback-classic
:
[debug] == resolving dependencies ch.qos.logback#logback-classic;1.0.10->ch.qos.logback#logback-core;1.0.10 [compile->master(*)]