zoukankan      html  css  js  c++  java
  • jar包冲突排解方法(sbt)

    jar包依赖冲突,版本不兼容会导致各种各样的问题。这里推荐一款sbt插件用于查找项目中的jar包依赖关系,通过该插件可以轻松的看出某个jar包依赖哪些jar,以及某个jar被哪些jar所依赖。此外该插件还可生成可视化图形用于查看依赖关系。

    插件地址:https://github.com/jrudolph/sbt-dependency-graph

    引用方式:

    addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.9.2")

    使用命令:

    Main Tasks
    dependencyTree: Shows an ASCII tree representation of the project's dependencies
    dependencyBrowseGraph: Opens a browser window with a visualization of the dependency graph (courtesy of graphlib-dot + dagre-d3).
    dependencyBrowseTree: Opens a browser window with a visualization of the dependency tree (courtesy of jstree).
    dependencyList: Shows a flat list of all transitive dependencies on the sbt console (sorted by organization and name)
    whatDependsOn <organization> <module> <revision>?: Find out what depends on an artifact. Shows a reverse dependency tree for the selected module. The <revision> argument is optional.
    dependencyLicenseInfo: show dependencies grouped by declared license
    dependencyStats: Shows a table with each module a row with (transitive) Jar sizes and number of dependencies
    dependencyGraphMl: Generates a .graphml file with the project's dependencies to target/dependencies-<config>.graphml. Use e.g. yEd to format the graph to your needs.
    dependencyDot: Generates a .dot file with the project's dependencies to target/dependencies-<config>.dot. Use graphviz to render it to your preferred graphic format.
    dependencyGraph: Shows an ASCII graph of the project's dependencies on the sbt console (only supported on sbt 0.13)
    ivyReport: Lets ivy generate the resolution report for you project. Use show ivyReport for the filename of the generated report

    样例:

     dependencyTree:按照树的方式列出所有的jar依赖关系

     dependencyBrowseTree:绘制依赖关系图,以*.html文件保存,可在浏览器中打开查看

     虚线是被替代的依赖

    whatDependsOn: 查看指定jar被哪些jar所依赖。使用方式:whatDependsOn <org> <module> <version>
       例如:whatDependsOn com.google.code.gson gson 2.8.0

    ===============================================

    原文链接:jar包冲突排解方法(sbt) 转载请注明出处!

    ===============================================

    ---end

  • 相关阅读:
    汉语-汉字:鬲
    汉语-汉字:鬻
    汉语-汉字:軎
    汉语-汉字:辔
    汉语-汉字:燮
    汉语-汉字:夔
    汉语-汉字:鬯、畅
    4-2电子时钟中的运算符重载
    华为OJ:计算字符个数
    POJ 3071 Football 【概率DP】
  • 原文地址:https://www.cnblogs.com/PerkinsZhu/p/9989188.html
Copyright © 2011-2022 走看看