How to find duplicate classes among dependencies with SBT

I am migrating a project from Apache Maven to sbt.

My project has a lot of dependencies (over 200), and sometimes the class can be duplicated, which can lead to strange effects.

In Maven, I used the maven-duplicate-finder-plugin to detect such cases.

The only solution I see is to create a large jar with the sbt-assembly plugin and configure complaints about duplicate classes. I have not tried it yet.

How can I do this using SBT?

Literature:

+5
source share
1 answer

I do not know a plugin that finds duplicate classes, but there is sbt-dependency-graph , which will list all the dependencies, including transitive ones, so you can analyze version conflicts, etc. Hope this helps in your use case.

0
source

Source: https://habr.com/ru/post/1209829/


All Articles