Fix java.util.zip.ZipException: duplicate entry

Fixes #4889

#4329 switched from using Map to Seq during packaging. That allowed multiple files to be included with different paths, but it also started admitting duplicate files causing ZipException.
This commit is contained in:
Eugene Yokota 2019-07-23 01:28:32 -04:00
parent 8793034039
commit 9512a60fa6
2 changed files with 2 additions and 1 deletions

View File

@ -104,7 +104,7 @@ object Package {
}
val inputFiles = conf.sources.map(_._1).toSet
val inputs = conf.sources :+: lastModified(inputFiles) :+: manifest :+: HNil
val inputs = conf.sources.distinct :+: lastModified(inputFiles) :+: manifest :+: HNil
cachedMakeJar(inputs)(() => exists(conf.jar))
()
}

View File

@ -5,6 +5,7 @@ version := "0.2"
mappings in (Compile, packageBin) ++= {
val test = file("test")
Seq(
test -> "test1",
test -> "test1",
test -> "test2"
)