Ошибки обновления SBT - PullRequest
       7

Ошибки обновления SBT

0 голосов
/ 12 января 2020

Я пытаюсь обновить приложение Scala Play Framework до 2.8, и это включает обновление SBT до 1.x.

В моих build.propeties У меня есть sbt.version=1.3.5

В plugins.sbt У меня

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.7.4")

Однако Я вижу следующее:

[warn] insecure HTTP request is deprecated 'http://repo.typesafe.com/typesafe/releases'; switch to HTTPS or opt-in as ("typesafe-releases" at "http://repo.typesafe.com/typesafe/releases").withAllowInsecureProtocol(true)
[warn] insecure HTTP request is deprecated 'http://repo.typesafe.com/typesafe/releases'; switch to HTTPS or opt-in as ("typesafe-releases" at "http://repo.typesafe.com/typesafe/releases").withAllowInsecureProtocol(true)
[warn] insecure HTTP request is deprecated 'http://repo.typesafe.com/typesafe/releases'; switch to HTTPS or opt-in as ("typesafe-releases" at "http://repo.typesafe.com/typesafe/releases").withAllowInsecureProtocol(true)
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]      com.typesafe.play:sbt-plugin:2.7.4 (sbtVersion=1.0, scalaVersion=2.12)
[error] sbt.librarymanagement.ResolveException: Error downloading com.typesafe.play:sbt-plugin;sbtVersion=1.0;scalaVersion=2.12:2.7.4
[error]   Not found
[error]   Not found
[error]   not found: https://repo1.maven.org/maven2/com/typesafe/play/sbt-plugin_2.12_1.0/2.7.4/sbt-plugin-2.7.4.pom
[error]   not found: /Users/Neil/.ivy2/local/com.typesafe.play/sbt-plugin/scala_2.12/sbt_1.0/2.7.4/ivys/ivy.xml
[error]   not found: /Users/Neil/.activator/repository/com.typesafe.play/sbt-plugin/scala_2.12/sbt_1.0/2.7.4/ivys/ivy.xml
[error]   not found: /usr/local/activator-1.3.6/repository/com.typesafe.play/sbt-plugin/scala_2.12/sbt_1.0/2.7.4/ivys/ivy.xml
[error]   not found: http://dl.bintray.com/heroku/sbt-plugins/com.typesafe.play/sbt-plugin/scala_2.12/sbt_1.0/2.7.4/ivys/ivy.xml
[error]   not found: http://dl.bintray.com/neomaclin/maven/com/typesafe/play/sbt-plugin_2.12_1.0/2.7.4/sbt-plugin-2.7.4.pom
[error]   download error: Caught javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target (sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target) while downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/sbt-plugin/scala_2.12/sbt_1.0/2.7.4/ivys/ivy.xml
[error]   download error: Caught javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target (sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target) while downloading https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/sbt-plugin/scala_2.12/sbt_1.0/2.7.4/ivys/ivy.xml

Вот мои средства распознавания:

resolvers += Resolver.typesafeRepo("releases")
resolvers += Resolver.typesafeIvyRepo("releases")
resolvers += Resolver.sbtPluginRepo("releases")
resolvers += Resolver.url("heroku-sbt-plugin-releases", url("http://dl.bintray.com/heroku/sbt-plugins/"))(Resolver.ivyStylePatterns)
resolvers += Resolver.bintrayRepo("neomaclin", "maven")

Что вызывает все эти предупреждения об использовании https? Что еще более важно, когда я смотрю эти ivy.xml файлы, я получаю 404, но, очевидно, те ошибки PKIX в консоли. Почему я получаю их, когда я не за прокси-сервером? Я предполагаю, что использую неправильные координаты, но не могу понять, как они неправильны.

Ответы [ 2 ]

0 голосов
/ 21 апреля 2020

Для меня сработало обновление JDK до 11, поскольку эта версия Java имеет сертификаты в хранилище доверенных сертификатов, необходимые для выполнения запросов, которые SBT хочет сделать.

0 голосов
/ 13 января 2020

Чтобы избежать этих ошибок, убедитесь, что у вас есть права доступа к репозиториям, к которым вам необходим доступ. Кроме того, убедитесь, что ваши файлы учетных данных sbt содержат учетные данные, используемые для доступа к этим хранилищам. Существуют различные способы настройки, либо через IntelliJ preferences > build, Execution, Deployments > sbt или ~/.sbt/.credentials.

...