SBT Assembly - Deduplicate error & Exclude error
Posted 苏轶然
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SBT Assembly - Deduplicate error & Exclude error相关的知识,希望对你有一定的参考价值。
sbt assembly
java.lang.RuntimeException: deduplicate: different file contents found in the following:
三种方法:
1.
seq(assemblySettings: _*) name := "StreamTest" version := "1.0" scalaVersion := "2.10.4" libraryDependencies += *** libraryDependencies += *** libraryDependencies ++= Seq( exclude("***", "***"). )
2.更新build.sbt
import AssemblyKeys._ seq(assemblySettings: _*) name := "SparkStreamingKinesis" version := "1.0" scalaVersion := "2.10.4" libraryDependencies += **** assemblyMergeStrategy in assembly := { case PathList(ps @ _*) if ps.last endsWith ".RSA" => MergeStrategy.first case x => val oldStrategy = (assemblyMergeStrategy in assembly).value oldStrategy(x) }
3.简单暴力,但不一定能保证工程稳定
找到重复报错的包,其中发生冲突的库的配置文件,直接删掉。-----我本人就是直接如此暴力解决。干脆利落。但可能会出现其他问题,一定留备份。
以上是关于SBT Assembly - Deduplicate error & Exclude error的主要内容,如果未能解决你的问题,请参考以下文章