我正在尝试使用sbt构建一个scala项目(scala版本 - 2.11.8,sbt版本 - 0.13.11,OS - MAC)。我正在为以下工件获取未解决的依赖项错误。我尝试在公司网络内部以及网络外部运行。我的同事能够毫无问题地建立同一个项目。
co.blocke#gitflow-packager; 0.1.3:未找到 com.eed3si9n#sbt-buildinfo; 0.5.0:未找到
这是我在“sbt compile”
时得到的错误的完整描述[info] Resolving co.blocke#gitflow-packager;0.1.3 ...
[error] Server access Error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target url=https://repo.typesafe.com/typesafe/ivy-releases/co.blocke/gitflow-packager/scala_2.10/sbt_0.13/0.1.3/ivys/ivy.xml
[error] Server access Error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target url=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/co.blocke/gitflow-packager/scala_2.10/sbt_0.13/0.1.3/ivys/ivy.xml
[error] Server access Error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target url=https://repo1.maven.org/maven2/co/blocke/gitflow-packager_2.10_0.13/0.1.3/gitflow-packager-0.1.3.pom
[error] Server access Error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target url=https://repository.jboss.org/nexus/content/repositories/co/blocke/gitflow-packager_2.10_0.13/0.1.3/gitflow-packager-0.1.3.pom
[warn] module not found: co.blocke#gitflow-packager;0.1.3
看起来发生了两个问题。
BuildSettings.scala
lazy val basicSettings = scalariformSettings ++ Seq(
organization := "com.abc",
description := "Microservice core infrastructure",
startYear := Some(2015),
scalaVersion := Scala,
parallelExecution in Test := false,
useJCenter := true,
// externalResolvers := Resolver.withDefaultResolvers(resolvers.value, mavenCentral = false),
ScalariformKeys.preferences := ScalariformKeys.preferences.value
.setPreference(AlignArguments, true)
.setPreference(AlignParameters, true)
.setPreference(AlignSingleLineCaseStatements, true)
.setPreference(DoubleIndentClassDeclaration, true)
.setPreference(PreserveDanglingCloseParenthesis, true),
// resolvers ++= Dependencies.resolutionRepos,
scalacOptions := Seq("-feature", "-deprecation", "-encoding", "UTF8", "-unchecked"),
testOptions in Test += Tests.Argument("-oDF")
// DON'T set a version! gitflow-packager plugin does this for us based on git-flow branch
)
}
更新 更新java证书后,Cert问题似乎已解决。这解决了以下
的依赖性问题com.eed3si9n#SBT-buildinfo; 0.5.0:
然而,co.blocke#gitflow-packager; 0.1.3的依赖性问题仍然存在。我可以在http://dl.bintray.com/blocke/releases/co.blocke/gitflow-packager/scala_2.10/sbt_0.13/0.1.3/jars/中看到依赖项,但sbt compile仍然没有查找jcenter。
这是更新的日志。
[info] Resolving co.blocke#gitflow-packager;0.1.3 ...
[warn] module not found: co.blocke#gitflow-packager;0.1.3
[warn] ==== typesafe-ivy-releases: tried
[warn] https://repo.typesafe.com/typesafe/ivy-releases/co.blocke/gitflow-packager/scala_2.10/sbt_0.13/0.1.3/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/co.blocke/gitflow-packager/scala_2.10/sbt_0.13/0.1.3/ivys/ivy.xml
[warn] ==== local: tried
[warn] /Users/abc123/.ivy2/local/co.blocke/gitflow-packager/scala_2.10/sbt_0.13/0.1.3/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/co/blocke/gitflow-packager_2.10_0.13/0.1.3/gitflow-packager-0.1.3.pom
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: co.blocke#gitflow-packager;0.1.3: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::