Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate jars #17

Open
kul opened this issue Mar 9, 2013 · 4 comments
Open

Duplicate jars #17

kul opened this issue Mar 9, 2013 · 4 comments

Comments

@kul
Copy link

kul commented Mar 9, 2013

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.

[error] ...*:one-jar: java.util.zip.ZipException: duplicate entry: lib/slf4j-log4j12-1.6.1.jar

Thanks

@xnickmx
Copy link

xnickmx commented Apr 29, 2013

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?

@rmerlorangeknocks
Copy link

If you have the jar in lib/ but the dependency also in your build.sbt you'll get this error. Hopefully that'll help

@kul
Copy link
Author

kul commented May 15, 2013

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
...

@jeffrey-aguilera
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants