gpt4 book ai didi

scala - 升级 SBT 时出错

转载 作者:行者123 更新时间:2023-12-04 13:39:25 27 4
gpt4 key购买 nike

我正在尝试将我的 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 错误。当我不在代理后面时,为什么我会得到这些?我想我使用了错误的坐标,但我无法弄清楚它们是如何出错的。

最佳答案

对我有用的是将我的 JDK 升级到 11,因为该版本的 Java 在其信任库中具有发出 SBT 想要发出的请求所必需的证书。

关于scala - 升级 SBT 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59705385/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com