我想将这个SecureSocial快照用于我的项目:
然而,SBT无法解决它。以下是错误消息:
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/ws/securesocial/securesocial_2.11/master-SNAPSHOT/securesocial_2.11-master-SNAPSHOT.pom
[warn] ==== typesafe-releases: tried
[warn] http://repo.typesafe.com/typesafe/releases/ws/securesocial/securesocial_2.11/master-SNAPSHOT/securesocial_2.11-master-SNAPSHOT.pom
[warn] ==== typesafe-ivy-releasez: tried
[warn] http://repo.typesafe.com/typesafe/ivy-releases/ws.securesocial/securesocial_2.11/master-SNAPSHOT/ivys/ivy.xml
[warn] ==== Typesafe Releases Repository: tried
[warn] https://repo.typesafe.com/typesafe/releases/ws/securesocial/securesocial_2.11/master-SNAPSHOT/securesocial_2.11-master-SNAPSHOT.pom
[info] Resolving jline#jline;2.12 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: ws.securesocial#securesocial_2.11;master-SNAPSHOT: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
以下是我的解析器和库依赖项:
Build.scala:
libraryDependencies ++= Seq(
"org.webjars" %% "webjars-play" % "2.3.0-3",
"org.logback-extensions" % "logback-ext-loggly" % "0.1.2",
"ws.securesocial" % "securesocial_2.11" % "master-SNAPSHOT"
)
plugins.sbt:
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
resolvers += "Sonatype OSS Releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2"
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"
据我所知,这应该有效,但事实并非如此。这个问题的原因是什么?
版本信息:
答案 0 :(得分:1)
您为图书馆添加的解析器应位于build.sbt
,而不是plugins.sbt
。这两个文件没有级联,如果你看到sbt的输出,它甚至都没有尝试连接到Sonatype。在build.sbt
中移动此行,它应该有效:
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"
值得注意的是,只有当您想要包含不在默认存储库中的sbt插件时,才需要在plugins.sbt
中添加解析器。