Open kul opened 11 years ago
I am having a similar problem:
[error] (*:one-jar) java.util.zip.ZipException: duplicate entry: lib/slf4j-api-1.6.1.jar
Any tips on how to avoid this?
If you have the jar in lib/
but the dependency also in your build.sbt
you'll get this error. Hopefully that'll help
I did something like this in my Build.scala file, Though its not ideal
lazy val Javax = """javax/servlet/.*""".r
....
mergeStrategy in assembly <<= (mergeStrategy in assembly) { (old) =>
{
case Javax() => MergeStrategy.first
...
Just started playing with sbt-onejar
as an alternative to sbt-assembly
. Immediately hit this three year old bug ... Guess I will revisit sbt-onejar
again in a few years, as this seems to be the pace of improvement. sbt-onejar
should not die when trying to add multiple identical copies of a jar to a project.
IMO having duplicate jars is pretty common for a moderately sized project. with sbt one-jar i get this error. I do not seem to find any help to avoid this.
Thanks