0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[メモ] sbtがMavenにhttpでリクエストして依存関係を解決できない時の設定

Posted at

業務でScalaやsbtを少しだけ触る機会があるのですが、先日今までビルドできていたプロジェクトが突然エラーになり、慌てて調べるとMavenが2020/01/15からHTTPをサポートしなくなったという事が分かりました。

Effective January 15, 2020, The Central Repository no longer supports insecure communication over plain HTTP and requires that all requests to the repository are encrypted over HTTPS.

https://stackoverflow.com/questions/59764749/requests-to-http-repo1-maven-org-maven2-return-a-501-https-required-status-an
https://stackoverflow.com/questions/59763531/maven-dependencies-are-failing-with-a-501-error

原因は分かったけど直し方がよく分からんということで公式サイトを読んで一旦以下の設定を追加することで解決。
本当はバージョンをちゃんと上げるとよいと思うのだけど…。
https://www.scala-sbt.org/1.x/docs/Proxy-Repositories.html

~/.sbt/repositories

[repositories]
  local
  maven2: https://repo1.maven.org/maven2/

あまり詳しくないので突っ込みどころありましたら指摘お願いします。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?