Ramin
Ramin

Reputation: 267

Unresolved dependency: sbt-plugin;2.7.0 when trying to compile a play template project

Created a new play template project following the guidance on Play's website "sbt new playframework/play-scala-seed.g8"

Trying to compile/run the project I get the following:

[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.play#sbt-plugin;2.7.0: Resolution failed several times for dependency: com.typesafe.play#sbt-plugin;2.7.0 {compile=[default(compile)]}:: 
[warn]  typesafe-ivy-releases: unable to get resource for com.typesafe.play#sbt-plugin;2.7.0: res=https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/sbt-plugin/scala_2.12/sbt_1.0/2.7.0/ivys/ivy.xml: 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
[warn]  sbt-plugin-releases: unable to get resource for com.typesafe.play#sbt-plugin;2.7.0: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/sbt-plugin/scala_2.12/sbt_1.0/2.7.0/ivys/ivy.xml: 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
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[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.0 (scalaVersion=2.12, sbtVersion=1.0)
[warn] 
[warn]  Note: Unresolved dependencies path:
[warn]      com.typesafe.play:sbt-plugin:2.7.0 (scalaVersion=2.12, sbtVersion=1.0) (/Users/ramin/Desktop/playground/project/plugins.sbt#L1-2)
[warn]        +- default:playground-build:0.1.0-SNAPSHOT (scalaVersion=2.12, sbtVersion=1.0)

My Scala version is 2.12.4 and I do have sbt 1.0 installed so a bit confused of why this is happening. Any thoughts?

Upvotes: 4

Views: 1115

Answers (1)

Rowan L
Rowan L

Reputation: 11

https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000094584-IDEA-Ultimate-2016-3-4-throwing-unable-to-find-valid-certification-path-to-requested-target-when-trying-to-refresh-gradle?page=1#community_comment_115000405564

If you follow the response on here, and then instead of the google.com part, use repo.scala-sbt.org

Like this:

echo -n | openssl s_client -connect repo.scala-sbt.org:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/scala.cer

The follow the rest of the instructions in the link, it should work.

Upvotes: 1

Related Questions