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,但是并没有做版本区分以及去重,这样相同的包可能就有 ...
随机推荐
- 微信自定义菜单errcode(40016)
最近在做微信开发,通过微信API创建自定义菜单时候出现:{"errcode":40016,"errmsg":"invalid button size ...
- HTTP Post multipart/form-data支持
最近需要向平台发送录像文件,但是Skynet没有multipart/form-data的Post请求支持,写篇blog记录一下 skynet有自带简单的httpc,里面有post方法.但是这个post ...
- docker ,docker与虚拟机的区别
什么是Docker: 1.Docker 是一个开源项目,诞生于 2013 年初,最初是 dotCloud 公司内部的一个业余项目.它基于 Google 公司推出的 Go 语言实现. 项目后来加入了 L ...
- CCF 消息传递接口 (队列) 201903-4 (100分)
[题目描述] 老师给了 T 份 MPI 的样例代码,每份代码都实现了 n 个进程通信.这些进程标号 从 0 到 n − 1,每个进程会顺序执行自己的收发指令,如:“S x”,“R x”.“S x”表示 ...
- 12集合(2)-----Set
一.总体分类 Collection(包括方法add,remove,contains,clear,size) List(接口) LinkedList ArrayList Vector---Stack 2 ...
- cocos creator 刚体卡顿问题(边界会卡住)
**问题描述:**在项目开发中,使用到了刚体, 在搭建地图过程中,发现两个相邻的砖块,即使贴合的再紧密,但星星人在上面走动的时候还是会有很大概率发生卡顿(被两个刚体的边界处卡住).为了解决这个问题,我 ...
- echarts立体效果地图-自定义区域及文字
setgeomap: function (_id, _fn) { // 全城拥堵占比 GLOBAL.myMapChart = echarts.init(document.getElementById( ...
- Linux与Windows的几点区别
echo $PATH 回显Linux环境变量PATH的值,Linux下的环境变量必须大写echo %path% 回显Windows环境变量path的值 export PATH=/usr/local/t ...
- hbase整合
hbase與hive整合 1. hive中有數據 --> 創建hive管理表映射hbase 例如: 1)hive創建內部表 create tabl ...
- Java design patterna
Java中的设计模式 设计模式是解决特定问题/任务的充分证明的解决方案. 现在,一个问题会在你脑海中产生什么样的具体问题?让我举个例子来解释一下. 给出的问题:假设您要创建一个只应创建单个实例(或对象 ...