How to find out which dependency caused a particular library to be downloaded?

后端 未结 1 2103
再見小時候
再見小時候 2021-02-12 21:08

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         


        
相关标签:
1条回答
  • 2021-02-12 22:03

    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(*)]
    
    0 讨论(0)
提交回复
热议问题