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
jar包冲突排解方法(sbt)的更多相关文章
- 【Maven】【IDEA】在idea中开发web项目,解决maven的jar包冲突的方法
在idea中开发web项目,解决maven的jar包冲突的方法 第一步: 先对项目进行 clean ,再进行install 第二步: 出现NoSuchMethodException,ClassNotF ...
- tomcat web工程 jar包冲突解决方法
目前在部署工程时,遇到了一个问题,报错信息如下: See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet ...
- jar包冲突解决方法
import java.io.File;import java.io.IOException;import java.util.ArrayList;import java.util.Enumerati ...
- sbt公布assembly解决jar包冲突 deduplicate: different file contents found in the following
一个.问题定义 近期使用sbt战斗assembly发生故障时,包,在package什么时候,发生jar包冲突/文件冲突,两个相同class来自不同jar包classpath内心冲突. 有关详细信息:我 ...
- jar包冲突常用的解决方法
jar包冲突常见的异常为找不到类(java.lang.ClassNotFoundException).找不到具体方法(java.lang.NoSuchMethodError).字段错误( java.l ...
- 通过一次SpringBoot打成war包部署到tomcat启动总结一般jar包冲突的解决方法
启动时,报错信息如下: 28-Sep-2018 16:55:41.567 严重 [localhost-startStop-1] org.apache.catalina.core.StandardCon ...
- xml-apis.jar getTextContent() jar包冲突解决(getTextContent()方法无法找到)
1.引用包: import org.w3c.dom.Document;import org.w3c.dom.Element;import org.w3c.dom.NodeList; 2.方法中应用: ...
- Maven项目-jar包冲突:MyServlet is not a Servlet解决方法
异常显示:运行时jar包冲突异常 问题所在: jar包冲突,自己导入的jar包与tomcat中的jar包相同. 解决方法: 对(servlet,jsp)jar包设置作用域. 再次启动项目,问题已解决.
- 为什么项目的jar包会和tomcat的jar包冲突?
为什么项目的jar包会和tomcat的jar包冲突? 碰到这个问题,猜测tomcat启动时会将自己的lib和项目的lib在逻辑上归并为一个大的lib,但是并没有做版本区分以及去重,这样相同的包可能就有 ...
随机推荐
- 【转载】 第四范式涂威威:AutoML技术现状与未来展望
原文地址: https://www.jiqizhixin.com/articles/2018-07-12-17 -------------------------------------------- ...
- caffe: c++11支持
1)在Makefile中400行左右, CXXFLAGS += -MMD -MP 改成:CXXFLAGS += -MMD -MP -std=c++0x,好像还改了不少地方,有的是 -std=c++1 ...
- 一种hyperscan API使用(1)
hyperscan: 编译和安装:http://www.cnblogs.com/zzqcn/p/4900643.html 简单介绍:http://www.cnblogs.com/zzqcn/p/489 ...
- jmeter 写正则表达式
():括起来的部分就是要提取的. .:匹配任何字符串. +:一次或多次. ?:不要太贪婪,在找到第一个匹配项后停止. 需要根据要取的数据取值 jt: eyJhbGciOiJSUzI1NiJ9.ey ...
- 田螺便利店—filezilla实现Linux和windows通信
新站点改为sftp,端口为22 2,虚拟机通过桥接模式连网,ip地址为:192.168.119.147 已通过新建站点方式(SFTP)连接服务器(使用user账户),但是在使用系统root账号登录时失 ...
- jQuery 追加元素、拼接元素的方法总结(append、html、insertBefore、before等)
1. append & appendTo 的功能均为:在被选元素结尾(仍在元素内部)插入指定内容,但是内容和选择器的位置不同 (1) append()方法: $("#test&quo ...
- rem,em,与px的比较用法
在Web中使用什么单位来定义页面的字体大小,至今天为止都还在激烈的争论着,有人说PX做为单位好,有人说EM优点多,还有人在说百分比方便,以至于出现了CSS Font-Size: em vs. px v ...
- Ajaxpro使用的方法
1.下载Ajaxpro.2.dll 程序中引用 2.web.config配置 <?xml version="1.0" encoding="utf-8"?& ...
- COOKIE和SESSION之间的区别以及用法
一.Session简单介绍 在WEB开发中,服务器可以为每个用户浏览器创建一个会话对象(session对象),注意:一个浏览器独占一个session对象(默认情况下).因此,在需要保存用户数据时,服务 ...
- Ubuntu18.04下make menuconfig缺少ncurses库
kent@hu:~/work/03-kernel/linux-4.15.1$ make menuconfig *** Unable to find the ncurses libraries or t ...