문제

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.

도움이 되었습니까?

해결책

  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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top