scala-steward-org / scala-steward

:robot: A bot that helps you keep your projects up-to-date
Apache License 2.0
1.15k stars 500 forks source link

Configuring and controlling multiple resolvers #1879

Open nilius opened 3 years ago

nilius commented 3 years ago

Hello great Scala-Steward team,

We ran into a special situation when using scala-steward 0.8.1 with multiple resolvers, which is difficult to solve for us. It would be great if you could help with advice!

We want to use two libraries. Since the second lib is not available in the default maven resolver, we add a resolver for confluent.

scalaVersion := "2.12.10"
resolvers += DefaultMavenRepository
resolvers += "Confluent Maven Repo" at "https://packages.confluent.io/maven"
lazy val compileDependencies = {
  Seq(
    "org.apache.kafka"            % "kafka-clients"            % "2.7.0",
    "io.confluent"                % "kafka-avro-serializer"    % "6.0.1",
  )
}
libraryDependencies ++= compileDependencies

Unfortunately, the lib org.apache.kafka/kafka-clients is available also in the confluent resolver:

Therefore, the scala stewarts creates a MR to update kafka-clients to 6.0.1ce, but we want to the newest version from the default maven resolver, which is 2.7.0. Put in other words, we want org.apache.kafka/kafka-clients only to be resolved against the DefaultMavenRepository, not against the Confluent Resolver.

Is there any way to control which libs are taken from which resolver?

Thanks for ideas!

Fabian

mzuehlke commented 3 years ago

I took the liberty to correct the usage of the terms "repository" and "resolver" in your issue to make the case (hopefully) more clear.