在 SBT 版本 1.2.8 中加载插件 sbt-assembly 时出现问题

在 SBT 版本 1.2.8 中加载插件 sbt-assembly 时出现问题

我在 sbt 1.2.8 工具中安装 assembly 插件时遇到了麻烦。我已在 sbt 设置文件中添加了以下配置。

site.sbt: 
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.3.3")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.5")

build.sbt file content: 
version := "1.0"
scalaVersion := "2.10.5"
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % "1.6.2" % "provided",
"org.apache.spark" %% "spark-sql" % "1.6.2" % "provided",
"org.apache.spark" %% "spark-hive" % "1.6.2" % "provided",
"com.databricks" % "spark-csv_2.10" % "1.4.0" % "provided",
"org.apache.commons" % "commons-lang3" % "3.0" % "provided")

我收到以下错误:

[error] (update) sbt.librarymanagement.ResolveException: unresolved dependency:
com.typesafe.sbt#sbt-site;1.3.3: Resolution failed several times for dependency:
 com.typesafe.sbt#sbt-site;1.3.3 {compile=[default(compile)]}::
[error]         typesafe-ivy-releases: unable to get resource for com.typesafe.s
bt#sbt-site;1.3.3: res=https://repo.typesafe.com/typesafe/ivy-releases/com.types
afe.sbt/sbt-site/scala_2.12/sbt_1.0/1.3.3/ivys/ivy.xml: javax.net.ssl.SSLHandsha
keException: sun.security.validator.ValidatorException: PKIX path building faile
d: sun.security.provider.certpath.SunCertPathBuilderException: unable to find va
lid certification path to requested target
[error]         sbt-plugin-releases: unable to get resource for com.typesafe.sbt
#sbt-site;1.3.3: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com
.typesafe.sbt/sbt-site/scala_2.12/sbt_1.0/1.3.3/ivys/ivy.xml: javax.net.ssl.SSLH
andshakeException: sun.security.validator.ValidatorException: PKIX path building
 failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to f
ind valid certification path to requested target
[error]         public: unable to get resource for com/typesafe/sbt#sbt-site;1.3
.3: res=https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-site_2.12_1.0/1.3.3/
sbt-site-1.3.3.pom: javax.net.ssl.SSLHandshakeException: sun.security.validator.
ValidatorException: PKIX path building failed: sun.security.provider.certpath.Su
nCertPathBuilderException: unable to find valid certification path to requested
target
[error]
[error] unresolved dependency: com.eed3si9n#sbt-assembly;0.14.5: Resolution fail
ed several times for dependency: com.eed3si9n#sbt-assembly;0.14.5 {compile=[defa
ult(compile)]}::
[error]         typesafe-ivy-releases: unable to get resource for com.eed3si9n#s
bt-assembly;0.14.5: res=https://repo.typesafe.com/typesafe/ivy-releases/com.eed3
si9n/sbt-assembly/scala_2.12/sbt_1.0/0.14.5/ivys/ivy.xml: javax.net.ssl.SSLHands
hakeException: sun.security.validator.ValidatorException: PKIX path building fai
led: sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target
[error]         sbt-plugin-releases: unable to get resource for com.eed3si9n#sbt
-assembly;0.14.5: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/co
m.eed3si9n/sbt-assembly/scala_2.12/sbt_1.0/0.14.5/ivys/ivy.xml: javax.net.ssl.SS
LHandshakeException: sun.security.validator.ValidatorException: PKIX path buildi
ng failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to
 find valid certification path to requested target
[error]         public: unable to get resource for com/eed3si9n#sbt-assembly;0.1
4.5: res=https://repo1.maven.org/maven2/com/eed3si9n/sbt-assembly_2.12_1.0/0.14.
5/sbt-assembly-0.14.5.pom: javax.net.ssl.SSLHandshakeException: sun.security.val
idator.ValidatorException: PKIX path building failed: sun.security.provider.cert
path.SunCertPathBuilderException: unable to find valid certification path to requested target

相关内容