業務で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/
あまり詳しくないので突っ込みどころありましたら指摘お願いします。