SecureSocial 未解决的依赖性 playframework

SecureSocial unresolved dependency playframework

我正在尝试将 securesocial 添加到我的 Play 2.3.x 项目中。这是我的 build.sbt 文件中的内容。

resolvers += Resolver.sonatypeRepo("releases")
libraryDependencies += "ws.securesocial" %% "securesocial" % "2.1.4"

这是我得到的堆栈跟踪

[info] Loading project definition from /home/chris/dev/suredbits-web/project
[info] Set current project to suredbits-web (in build file:/home/chris/dev/suredbits-web/)
[info] Updating {file:/home/chris/dev/suredbits-web/}root...
[info] Resolving ws.securesocial#securesocial_2.11;2.1.4 ...
[warn]  module not found: ws.securesocial#securesocial_2.11;2.1.4
[warn] ==== local: tried
[warn]   /home/chris/.ivy2/local/ws.securesocial/securesocial_2.11/2.1.4/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/ws/securesocial/securesocial_2.11/2.1.4/securesocial_2.11-2.1.4.pom
[warn] ==== Typesafe Releases Repository: tried
[warn]   https://repo.typesafe.com/typesafe/releases/ws/securesocial/securesocial_2.11/2.1.4/securesocial_2.11-2.1.4.pom
[warn] ==== sonatype-releases: tried
[warn]   https://oss.sonatype.org/content/repositories/releases/ws/securesocial/securesocial_2.11/2.1.4/securesocial_2.11-2.1.4.pom
[info] Resolving jline#jline;2.12 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: ws.securesocial#securesocial_2.11;2.1.4: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn]  Note: Unresolved dependencies path:
[warn]      ws.securesocial:securesocial_2.11:2.1.4 (/home/chris/dev/suredbits-web/build.sbt#L13-40)
[warn]        +- com.suredbits.web:suredbits-web_2.11:0.0
sbt.ResolveException: unresolved dependency: ws.securesocial#securesocial_2.11;2.1.4: not found
    at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:278)
    at sbt.IvyActions$$anonfun$updateEither.apply(IvyActions.scala:175)
    at sbt.IvyActions$$anonfun$updateEither.apply(IvyActions.scala:157)
    at sbt.IvySbt$Module$$anonfun$withModule.apply(Ivy.scala:151)
    at sbt.IvySbt$Module$$anonfun$withModule.apply(Ivy.scala:151)
    at sbt.IvySbt$$anonfun$withIvy.apply(Ivy.scala:128)
    at sbt.IvySbt.sbt$IvySbt$$action(Ivy.scala:56)
    at sbt.IvySbt$$anon.call(Ivy.scala:64)
    at xsbt.boot.Locks$GlobalLock.withChannel(Locks.scala:93)
    at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries(Locks.scala:78)
    at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock.apply(Locks.scala:97)
    at xsbt.boot.Using$.withResource(Using.scala:10)
    at xsbt.boot.Using$.apply(Using.scala:9)
    at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
    at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
    at xsbt.boot.Locks$.apply0(Locks.scala:31)
    at xsbt.boot.Locks$.apply(Locks.scala:28)
    at sbt.IvySbt.withDefaultLogger(Ivy.scala:64)
    at sbt.IvySbt.withIvy(Ivy.scala:123)
    at sbt.IvySbt.withIvy(Ivy.scala:120)
    at sbt.IvySbt$Module.withModule(Ivy.scala:151)
    at sbt.IvyActions$.updateEither(IvyActions.scala:157)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work.apply(Defaults.scala:1318)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work.apply(Defaults.scala:1315)
    at sbt.Classpaths$$anonfun$doWork$$anonfun.apply(Defaults.scala:1345)
    at sbt.Classpaths$$anonfun$doWork$$anonfun.apply(Defaults.scala:1343)
    at sbt.Tracked$$anonfun$lastOutput.apply(Tracked.scala:35)
    at sbt.Classpaths$$anonfun$doWork.apply(Defaults.scala:1348)
    at sbt.Classpaths$$anonfun$doWork.apply(Defaults.scala:1342)
    at sbt.Tracked$$anonfun$inputChanged.apply(Tracked.scala:45)
    at sbt.Classpaths$.cachedUpdate(Defaults.scala:1360)
    at sbt.Classpaths$$anonfun$updateTask.apply(Defaults.scala:1300)
    at sbt.Classpaths$$anonfun$updateTask.apply(Defaults.scala:1275)
    at scala.Function1$$anonfun$compose.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219.apply(TypeFunctions.scala:40)
    at sbt.std.Transform$$anon.work(System.scala:63)
    at sbt.Execute$$anonfun$submit$$anonfun$apply.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$$anonfun$apply.apply(Execute.scala:226)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
    at sbt.Execute.work(Execute.scala:235)
    at sbt.Execute$$anonfun$submit.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit.apply(Execute.scala:226)
    at sbt.ConcurrentRestrictions$$anon$$anonfun.apply(ConcurrentRestrictions.scala:159)
    at sbt.CompletionService$$anon.call(CompletionService.scala:28)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
[error] (*:update) sbt.ResolveException: unresolved dependency: ws.securesocial#securesocial_2.11;2.1.4: not found
[error] Total time: 5 s, completed Feb 18, 2015 5:20:02 AM

SecureSocial 2.1.4 不是为您正在使用的 Scala 2.11 构建的。如果要使用 2.1.4,则需要切换回 Scala 2.10,或者等到 3.0 发布。

您可以尝试为 Scala 2.11 构建的 3.0 里程碑之一,但我不能说它们的生产准备情况如何。

libraryDependencies += "ws.securesocial" %% "securesocial" % "3.0-M3"

当您使用 %% 而不是单个 % 时,sbt 会尝试查找特定于您的 scala 版本的依赖版本...在本例中为 securesocial_2.11securesocial_2.11 没有 SecureSocial 版本 2.1.4... 至少现在还没有。

如果您查看 scala 2.10 和 2.11 的 Sonatype 存储库,您会看到

对于 2.10 (https://oss.sonatype.org/content/repositories/releases/ws/securesocial/securesocial_2.10/)您有以下版本:

  • 2.1.3
  • 2.1.4
  • 3.0-M1-play-2.2.x
  • 3.0-M1
  • 3.0-M2
  • 3.0-M3

但是对于 scala 2.11 (https://oss.sonatype.org/content/repositories/releases/ws/securesocial/securesocial_2.11/),你只有这些

  • 3.0-M1
  • 3.0-M2
  • 3.0-M3

所以...您应该使用 scala 2.11 的可用选项之一或使用 scala 2.10。

libraryDependencies += "ws.securesocial" %% "securesocial" % "3.0-M3"

有一个选项,你应该试试这个。

libraryDependencies += "ws.securesocial" % "securesocial_2.11" % "2.1.4.1-for-play24"

对我有用。

此致!