1

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.

  1. Getting cert issues when connecting to the above repositories
  2. It is not connecting to bintray/jcenter even though the flag useJCenter := true is set (This is the required flag for looking for the dependencies in jcenter for sbt version 0.13.11).

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]  ::::::::::::::::::::::::::::::::::::::::::::::
Sri
  • 61
  • 8
  • can you give the relevant part of your sbt file? – marios Apr 23 '16 at 05:35
  • maybe some authorization file is missing on your pc? I had the same problem some time ago, missing the credentials for private maven/ivy – pedrorijo91 Apr 23 '16 at 12:13
  • I added buildsettings that i am using. – Sri Apr 24 '16 at 02:39
  • @pedrorijo91 , where do i check for these credentials? – Sri Apr 24 '16 at 03:01
  • Cert issue is resolved however one the dependencies that is in jcenter is still not found. Can you please help me with this? – Sri Apr 25 '16 at 04:58
  • This is resolved. Had to force SBT to point to a particular repository using resolver. resolvers += Resolver.url("co.blocke ivy resolver", url("http://dl.bintray.com/blocke/releases/"))(Resolver.ivyStylePatterns) – Sri Apr 27 '16 at 19:11

1 Answers1

0

look at this that I posted, https://stackoverflow.com/a/48671697/3169330

essentially, you need a config option to sbt

ameet chaubal
  • 1,440
  • 16
  • 37