Reputation: 61
I am trying to build a scala project with sbt (scala version- 2.11.8, sbt version - 0.13.11 , OS - MAC). I am getting unresolved dependencies error for the following artifacts. I tried running both within in company network as well as outside the network. My Co-worker is able to build the same project without any issues.
co.blocke#gitflow-packager;0.1.3: not found com.eed3si9n#sbt-buildinfo;0.5.0: not found
Here is the complete trace of the error that i get when i do "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
Looks like there are two issues happening.
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
)
}
Update : The Cert issue seems to have resolved after updating the java certs. This resolved the dependency issue for the following
com.eed3si9n#sbt-buildinfo;0.5.0:
However, the dependency issue for co.blocke#gitflow-packager;0.1.3: still persists. I can see the dependency in http://dl.bintray.com/blocke/releases/co.blocke/gitflow-packager/scala_2.10/sbt_0.13/0.1.3/jars/ but the sbt compile is still not looking for jcenter.
Here is updated logs.
[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] ::::::::::::::::::::::::::::::::::::::::::::::
Upvotes: 1
Views: 2465
Reputation: 1550
look at this that I posted, https://stackoverflow.com/a/48671697/3169330
essentially, you need a config option to sbt
Upvotes: 0