Sbt 排除依赖冲突详细解析
1.Sbt 依赖树 参考: 安装插件 插件启动 问题: "org.apache.hbase" % "hbase-client" % "1.2.6","org.apache.hbase" % "hbase-common" % "1.2.6","org.apache.hbase" % "hbase-server" % "1.2.6","org.apache.hbase" % "hbase-protocol" % "1.2.6","org.apache.hive" % "hive-jdbc" % "2.3.2","org.apache.hive" % "hive-cli" % "2.3.2",
项目中依赖截图如下所示: 解决依赖: 依赖从下往上看“com.jd.jr:graph_importer_2.11:1.0-SNAPSHOT”依赖–>“org.apache.hive:hive-cli:2.3.2”依赖–>“org.apache.hive:hive-service:2.3.2”依赖–>“org.apache.hive:hive-llap-server:2.3.2”依赖–>“org.apache.hbase:hbase-server:1.1.1” 找到问题了,需要在“org.apache.hive:hive-cli:2.3.2”排除“org.apache.hbase:hbase-server:1.1.1” sbt:graph_importer> whatDependsOn org.apache.hbase hbase-server 1.1.1
[info] org.apache.hbase:hbase-server:1.1.1 (evicted by: 1.2.6)
[info] +-com.jd.jr:graph_importer_2.11:1.0-SNAPSHOT [S]
[info] +-org.apache.hive:hive-llap-server:2.3.2
[info] +-org.apache.hive:hive-service:2.3.2
[info] +-org.apache.hive:hive-cli:2.3.2
[info] | +-com.jd.jr:graph_importer_2.11:1.0-SNAPSHOT [S]
[info] |
[info] +-org.apache.hive:hive-jdbc:2.3.2
[info] +-com.jd.jr:graph_importer_2.11:1.0-SNAPSHOT [S]
[info]
3)其余三个不需要的Jar包参考第二步 "org.apache.hbase" % "hbase-client" % "1.2.6","org.apache.hive" % "hive-jdbc" % "2.3.2"
exclude("org.apache.hbase","hbase-protocol")
exclude("org.apache.hbase","hbase-client")
exclude("org.apache.hbase","hbase-common")
exclude("org.apache.hbase","hbase-service"),"org.apache.hive" % "hive-cli" % "2.3.2"
exclude("org.apache.hbase",
4)sbt中先“clean”再“compile”.(其中compile包括了update) (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |