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.简单暴力,但不一定能保证工程稳定
找到重复报错的包,其中发生冲突的库的配置文件,直接删掉。-----我本人就是直接如此暴力解决。干脆利落。但可能会出现其他问题,一定留备份。
时间: 2024-10-01 19:29:57