Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sbt-scalafix doesn't respect sbt.override.build.repos #1049

Closed
sideeffffect opened this issue Jan 27, 2020 · 2 comments
Closed

sbt-scalafix doesn't respect sbt.override.build.repos #1049

sideeffffect opened this issue Jan 27, 2020 · 2 comments

Comments

@sideeffffect
Copy link
Contributor

sideeffffect commented Jan 27, 2020

That means sbt.repository.config repositories don't get used and the build in a closed environment behind a caching proxy like Nexus or Artifactory fails, because it can't download scalafix

[Step 1/1] [error] coursierapi.error.SimpleResolutionError$1: Error downloading ch.epfl.scala:scalafix-cli_2.12.10:0.9.11
[Step 1/1] [error]   not found: /root/.ivy2/local/ch.epfl.scala/scalafix-cli_2.12.10/0.9.11/ivys/ivy.xml
[Step 1/1] [error]   download error: Caught java.net.ConnectException: Connection timed out (Connection timed out) (Connection timed out (Connection timed out)) while downloading https://repo1.maven.org/maven2/ch/epfl/scala/scalafix-cli_2.12.10/0.9.11/scalafix-cli_2.12.10-0.9.11.pom
[Step 1/1] [error]   download error: Caught java.net.ConnectException: Connection timed out (Connection timed out) (Connection timed out (Connection timed out)) while downloading https://oss.sonatype.org/content/repositories/releases/ch/epfl/scala/scalafix-cli_2.12.10/0.9.11/scalafix-cli_2.12.10-0.9.11.pom
[Step 1/1] [error]   download error: Caught java.net.ConnectException: Connection timed out (Connection timed out) (Connection timed out (Connection timed out)) while downloading https://oss.sonatype.org/content/repositories/snapshots/ch/epfl/scala/scalafix-cli_2.12.10/0.9.11/scalafix-cli_2.12.10-0.9.11.pom
[Step 1/1] [error] 	at coursierapi.error.SimpleResolutionError.of(SimpleResolutionError.java:11)
[Step 1/1] [error] 	at coursierapi.shaded.coursier.internal.api.ApiHelper$.simpleResError(ApiHelper.scala:324)
[Step 1/1] [error] 	at coursierapi.shaded.coursier.internal.api.ApiHelper$.doFetch(ApiHelper.scala:357)
[Step 1/1] [error] 	at coursierapi.shaded.coursier.internal.api.ApiHelper.doFetch(ApiHelper.scala)
[Step 1/1] [error] 	at coursierapi.Fetch.fetchResult(Fetch.java:244)
[Step 1/1] [error] 	at coursierapi.Fetch.fetch(Fetch.java:239)
[Step 1/1] [error] 	at scalafix.internal.sbt.ScalafixCoursier$.runFetch(ScalafixCoursier.scala:88)

comparable to scalameta/sbt-scalafmt#62

setting COURSIER_REPOSITORIES env variable doesn't help

setting ThisBuild / scalafixResolvers works around this issue

@bjaglin
Copy link
Collaborator

bjaglin commented Mar 30, 2022

related discussion scalacenter/sbt-scalafix#292 (comment)

@bjaglin
Copy link
Collaborator

bjaglin commented Dec 29, 2024

should be fixed by scalacenter/sbt-scalafix#404

@bjaglin bjaglin closed this as completed Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants