The title could also be:
What are the differences between Maven and SBT assembly plugins.
I have found this to be an issue, while migrating a proje
I have also updated my project with detailed explanation, so you might want to check it out.
Following the advice
You can verify it for this case by unpacking the jar Maven produces and the dependency jars in SBT error message, then checking which .class file Maven used.
I compared the fat-jars produced by maven and sbt with
MergeStrategy.first, that showed some extra filesMergeStrategy.last, that showed binary differences & extra filesI have taken the next step and checked the fat-jars against the dependencies sbt found conflicts at, specifically:
maven-assembly-plugin resolves conflicts on jar level.
When it finds any conflict, it picks the first jar and simply ignores all the content from the other.
Whereas sbt-assembly mixes all the class files, resolving conflicts locally, file by file.
My theory would be, that if your fat-jar made with maven-assembly-plugin works, you can
specify MergeStrategy.first for all the conflicts in sbt.
They only difference would be, that the jar produced with sbt will be even bigger, containing extra classes that were ignored by maven.