Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SBT custom conflict manager

I would like to get a better idea of conflicting dependencies between artifacts in my organization. For this, I have created a meta-project that includes all the other top-level projects. To identify conflicts of various transitive dependencies, my idea was to use a conflict manager.

I know I can set a conflict manager like this

conflictManager := ConflictManager.strict
  1. How would I set the strict manager only for com.example packages, and possibly compose it with other more specific managers?
  2. Is it possible to create completely custom dependency managers, which would only warn about conflicts?

I am also thankful for other ideas on solving this problem.

like image 657
Justin Kaeser Avatar asked Dec 31 '25 12:12

Justin Kaeser


1 Answers

  1. You can do it with

    conflictManager := ConflictManager.strict.copy(organization = "com.example.*")

    You can vary (Ivy) type of conflict manager, organization and module filters. See this sbt source with it's definition. Also see Ivy docs on types of conflict managers

  2. It seems that you can define a custom Ivy conflict manager setting it's name with ConflictManager("...") (see the Ivy docs on what you can to write there). Although I don't see any way to combine several conflict managers: sbt provides only one setting key conflictManager and sets the ivy manager directly from it.

like image 197
laughedelic Avatar answered Jan 06 '26 07:01

laughedelic



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!