How can I find duplicate classes amongst dependencies with SBT [closed]

删除回忆录丶 提交于 2020-01-03 15:30:54

问题


I'm migrating a project from Apache Maven to sbt.

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

In Maven I've been using maven-duplicate-finder-plugin for detecting such cases.

The only solution I can see is to generate a big jar with sbt-assembly plugin, and configure to complain about duplicated classes. I haven't tried it yet.

How can I do it with SBT?

References:

  • List of SBT plugins
  • SBT assembly plugin documentation.

回答1:


I don't know of a plugin which finds duplicate classes, but there is sbt-dependency-graph which will list out all dependencies including transitive ones. This way you can analyze version conflicts and such. Hopefully this will help with your use case.



来源:https://stackoverflow.com/questions/27635346/how-can-i-find-duplicate-classes-amongst-dependencies-with-sbt

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!