sbt / sbt

sbt, the interactive build tool
https://scala-sbt.org
Apache License 2.0
4.81k stars 937 forks source link

[sbt-1.3.0-RC3] custom resolver not used for resolving plugin dependencies #4932

Open 2m opened 5 years ago

2m commented 5 years ago

steps

sbt version: 1.3.0-RC3

When a plugin is added to the global configuration that needs a custom resolver, plugin dependencies are not resolved.

For example, given such global configuration:

~/.sbt/1.0/plugins/build.sbt
---------------------------------
addSbtPlugin("lt.dvim.authors" % "sbt-authors" % "1.0.2")
resolvers += Resolver.bintrayRepo("jypma", "maven") // for ts-reaktive

Any project fails to load with the following error:

[error]   Not found
[error]   not found: /home/martynas/.ivy2/local/com.tradeshift/ts-reaktive-marshal-akka_2.12/0.11.0/ivys/ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/tradeshift/ts-reaktive-marshal-akka_2.12/0.11.0/ts-reaktive-marshal-akka_2.12-0.11.0.pom
[error]   not found: https://repo.scala-sbt.org/scalasbt/maven-releases/com/tradeshift/ts-reaktive-marshal-akka_2.12/0.11.0/ts-reaktive-marshal-akka_2.12-0.11.0.pom
[error]   not found: https://repo.scala-sbt.org/scalasbt/maven-snapshots/com/tradeshift/ts-reaktive-marshal-akka_2.12/0.11.0/ts-reaktive-marshal-akka_2.12-0.11.0.pom
[error]   not found: https://repo.typesafe.com/typesafe/ivy-releases/com.tradeshift/ts-reaktive-marshal-akka_2.12/0.11.0/ivys/ivy.xml
[error]   not found: https://repo.scala-sbt.org/scalasbt/ivy-snapshots/com.tradeshift/ts-reaktive-marshal-akka_2.12/0.11.0/ivys/ivy.xml
[error]   not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.tradeshift/ts-reaktive-marshal-akka_2.12/0.11.0/ivys/ivy.xml

problem

Custom resolver is not considered when resolving global plugin dependencies.

expectation

Plugin dependencies should be resolved using the custom resolver.

notes

If such plugin and resolver are added to the local project build (./project/plugins.sbt) then project loads successfully.

Somewhat relevant discussion: https://github.com/sbt/sbt/issues/4802#issuecomment-517703103

eed3si9n commented 5 years ago

@2m Thanks for the report!

SethTisue commented 1 year ago

I wonder if this is still reproducible on current sbt.