執筆時の sbt のバージョンが 1.5.5 だったので、 LGTMoon (https://lgtmoon.herokuapp.com/)で使っている sbt のバージョンを 1.3.9 から 1.5.5 に上げる作業を行いました。
sbt を 1.3.9 から、1.4.9 (1.4系の最新)に上げた際に以下のエラーが発生しました。
#9 96.68 [error] insecure HTTP request is unsupported 'http://dl.bintray.com/scalaz/releases'; switch to HTTPS or opt-in as ("scalaz-bintray" at "http://dl.bintray.com/scalaz/releases").withAllowInsecureProtocol(true), or by using allowInsecureProtocol in repositories file #9 96.72 [error] insecure HTTP request is unsupported 'http://dl.bintray.com/scalaz/releases'; switch to HTTPS or opt-in as ("scalaz-bintray" at "http://dl.bintray.com/scalaz/releases").withAllowInsecureProtocol(true), or by using allowInsecureProtocol in repositories file #9 96.73 [error] insecure HTTP request is unsupported 'http://dl.bintray.com/scalaz/releases'; switch to HTTPS or opt-in as ("scalaz-bintray" at "http://dl.bintray.com/scalaz/releases").withAllowInsecureProtocol(true), or by using allowInsecureProtocol in repositories file #9 96.91 [error] java.lang.RuntimeException: insecure protocol is unsupported #9 96.91 [error] at scala.sys.package$.error(package.scala:30) #9 96.91 [error] at sbt.Classpaths$.errorInsecureProtocol(Defaults.scala:3156) #9 96.91 [error] at sbt.Classpaths$.$anonfun$mkIvyConfiguration$1(Defaults.scala:3752) #9 96.91 [error] at scala.Function1.$anonfun$compose$1(Function1.scala:49) #9 96.91 [error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) #9 96.91 [error] at sbt.std.Transform$$anon$4.work(Transform.scala:68) #9 96.91 [error] at sbt.Execute.$anonfun$submit$2(Execute.scala:282) #9 96.91 [error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23) #9 96.91 [error] at sbt.Execute.work(Execute.scala:291) #9 96.91 [error] at sbt.Execute.$anonfun$submit$1(Execute.scala:282) #9 96.91 [error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265) #9 96.91 [error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64) #9 96.91 [error] at java.util.concurrent.FutureTask.run(FutureTask.java:266) #9 96.92 [error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) #9 96.92 [error] at java.util.concurrent.FutureTask.run(FutureTask.java:266) #9 96.92 [error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) #9 96.92 [error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) #9 96.92 [error] at java.lang.Thread.run(Thread.java:748)
http://dl.bintray.com/scalaz/releases
という URL からライブラリをダウンロードしているが、この URL を HTTPS にしろ、というエラーです。
古いプロジェクトの場合、 build.sbt
に以下のような記載があるので、この URL を https に変更してあげるだけで解決します。
resolvers += "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases"
変更後
resolvers += "scalaz-bintray" at "https://dl.bintray.com/scalaz/releases"
この URL 以外にも、 build.sbt に http のものがあれば、 https に変更しておきます。
これでエラーが消えて、 sbt のバージョンを 1.5.5 まで上げることができました。
ちなみに、リリースされている sbt のバージョンは以下で確認できます。