-
Notifications
You must be signed in to change notification settings - Fork 224
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
resolving deduplicate problems in build.sbt #146
Comments
Just a friendly suggestion - why is merging such a big hassle in this plugin, seeing so many issues around this, presence of so many issues around this is probably reason enough to believe it can be done in a better way, without users having to deal with all this complexity. Something isn't right. |
I had similar problem with akka 2.64 and akka-serialization-jackson: [error] (assembly) deduplicate: different file contents found in the following:
[error] /path/to/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.10.3/jackson-annotations-2.10.3.jar:module-info.class
[error] /path/to/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.10.3/jackson-core-2.10.3.jar:module-info.class
[error] /path/to/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.10.3/jackson-databind-2.10.3.jar:module-info.class
[error] /path/to/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-cbor/2.10.3/jackson-dataformat-cbor-2.10.3.jar:module-info.class
[error] /path/to/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.10.3/jackson-datatype-jdk8-2.10.3.jar:module-info.class
[error] /path/to/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.10.3/jackson-datatype-jsr310-2.10.3.jar:module-info.class
[error] /path/to/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/fasterxml/jackson/module/jackson-module-parameter-names/2.10.3/jackson-module-parameter-names-2.10.3.jar:module-info.class
[error] /path/to/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/fasterxml/jackson/module/jackson-module-paranamer/2.10.3/jackson-module-paranamer-2.10.3.jar:module-info.class My problem was solved with next assembly config: assemblyMergeStrategy in assembly := {
case PathList("jackson-annotations-2.10.3.jar", xs @ _*) => MergeStrategy.last
case PathList("jackson-core-2.10.3.jar", xs @ _*) => MergeStrategy.last
case PathList("jackson-databind-2.10.3.jar", xs @ _*) => MergeStrategy.last
case PathList("jackson-dataformat-cbor-2.10.3.jar", xs @ _*) => MergeStrategy.last
case PathList("jackson-datatype-jdk8-2.10.3.jar", xs @ _*) => MergeStrategy.last
case PathList("jackson-datatype-jsr310-2.10.3.jar", xs @ _*) => MergeStrategy.last
case PathList("jackson-module-parameter-names-2.10.3.jar", xs @ _*) => MergeStrategy.last
case PathList("jackson-module-paranamer-2.10.3.jar", xs @ _*) => MergeStrategy.last
case _ => MergeStrategy.first
} But I still cannot understand what I've just did and why it solves my problem... Regards, |
In addition to what @daggerok recommended (thanks it worked!) to fix the next set of problems such as
|
This does not work.
|
you don't need module-info.class, so you can simply discard it by |
Thank you very much! I had the same problem and it worked! |
The
|
The point of the ThisBuild / assemblyMergeStrategy := {
case PathList(ps @ _*) if ps.last == "module-info.class" => MergeStrategy.discard
case x =>
val oldStrategy = (ThisBuild / assemblyMergeStrategy).value
oldStrategy(x)
} |
It's still an issue after years. Is this fixed? I really prefer a different build plugin than going through hundreds of dedup conflicts |
Still an issue. I switched to Maven Shade Plugin. Works perfect. http://www.mkyong.com/maven/create-a-fat-jar-file-maven-shade-plugin |
What is the most recent way to fix this? |
None that I've seen. Best fix is to move to Maven Shade Plugin. This issue should not be Closed. This has been a bug since at least 2015. |
How should I deal with
my build.sbt snippet:
The text was updated successfully, but these errors were encountered: