Closed mmesar closed 1 year ago
i guess problem is in play-mailer
Well, the problem is that the resources in different dependencies overlap and aren't identical.
In the case of mailcap.default and mimetypes.default, I suspect the files are actually really similar and you can configure the assemblyMergeStrategy to just pick one.
In case of the overlap between jakarta.activation-api and javax.activation, I guess it would be best to pick one and exclude the other dependency from your dependency tree?
I succeed in making jar with following code added in build.sbt
excludeDependencies ++= Seq(
ExclusionRule("javax.activation")
)
Again following question may not be appropriate to this place. Again would be grateful with advice where to look and ask next. I am curious what exactly is happening here so I could understand the situation better. This is my take on it. At some point while 'building' jar, 'engine' will download all dependencies from all 'components' that are used in the project. At some other point while injecting the objects 'engine' will stumble upon an object, that has to be injected, that is typed as an interface. Next, the engine will search in, I assume, classpath for a class that implement that interface but will find multiple classes that implement given interface and that's where a collision occurs.
Am I on the right path of understanding this or? Thx
This is not play-mailer specific, you should ask further questions in https://github.com/sbt/sbt-assembly
Hi, im using scala 2.13.1, play framework version 2.8.1, sbt version 1.3.4
have dependencies:
and I am using sbt assembly plugin
("com.eed3si9n" % "sbt-assembly" % "0.14.5")
to create nice fat single jar with this configurationWhen i try to run
sbt assembly
command I get thisi removed play-mailer and deduplicate errors don't show anymore... so i guess problem is in play-mailer.
I am not so skilled in scala and sbt environment, build flows etc. Would appreciate advice how to tackle this or in what direction should i continue to search and learn.