将securesocial模块添加到play 2.2.1项目中

时间:2013-11-22 09:19:30

标签: java playframework playframework-2.0 dependencies

我想在我的游戏项目中添加securesocial,以便轻松整合用户的注册/登录设置。但是,在我的build.sbt文件中添加dependecy时,我得到:

[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: securesocial#securesocial;2.1.2: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: unresolved dependency: securesocial#securesocial;2.1.2: no
t found
        at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:213)
        at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:122)
        at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:121)
        at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:116)
        at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:116)
        at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:104)
        at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:51)
        at sbt.IvySbt$$anon$3.call(Ivy.scala:60)
        at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:98)
        at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRet
ries$1(Locks.scala:81)
        at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:
102)
        at xsbt.boot.Using$.withResource(Using.scala:11)
        at xsbt.boot.Using$.apply(Using.scala:10)
        at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:62)
        at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:52)
        at xsbt.boot.Locks$.apply0(Locks.scala:31)
        at xsbt.boot.Locks$.apply(Locks.scala:28)
        at sbt.IvySbt.withDefaultLogger(Ivy.scala:60)
        at sbt.IvySbt.withIvy(Ivy.scala:101)
        at sbt.IvySbt.withIvy(Ivy.scala:97)
        at sbt.IvySbt$Module.withModule(Ivy.scala:116)
        at sbt.IvyActions$.update(IvyActions.scala:121)
        at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala
:1144)
        at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala
:1142)
        at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$73.apply(Defaults.scala:1
165)
        at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$73.apply(Defaults.scala:1
163)
        at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
        at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1167)
        at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1162)
        at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
        at sbt.Classpaths$.cachedUpdate(Defaults.scala:1170)
        at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1135)
        at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1113)
        at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
        at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
        at sbt.std.Transform$$anon$4.work(System.scala:64)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:23
7)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:23
7)
        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
        at sbt.Execute.work(Execute.scala:244)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
        at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestric
tions.scala:160)
        at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
[error] (*:update) sbt.ResolveException: unresolved dependency: securesocial#sec
uresocial;2.1.2: not found
[error] Total time: 6 s, completed 22.11.2013 10:15:38

我添加了依赖性:

libraryDependencies ++= Seq(
  javaJdbc,
  javaEbean,
  cache,
  "securesocial" % "securesocial" % "2.1.2"
)     

怎么了?

感谢您的回答!

3 个答案:

答案 0 :(得分:1)

也许尝试(在build.sbt中)......

resolvers += "sbtplugins" at "http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases"

答案 1 :(得分:1)

对于Securesocial,我的build.sbt解析器看起来像这样:

解析器+ = Resolver.url(“sbt-plugin-releases”,url(“http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/”))(Resolver.ivyStylePatterns)

答案 2 :(得分:1)

这是一个运行良好的build.sbt文件示例

name := "name"

version := "1.0-SNAPSHOT"

libraryDependencies ++= Seq(
"securesocial" %% "securesocial" % "master-SNAPSHOT"
)

resolvers ++= Seq(
  Resolver.url("sbt-plugin-snapshots", new URL("http://repo.scala-sbt.org/scalasbt/sbt-plugin-snapshots/"))(Resolver.ivyStylePatterns)
)

play.Project.playScalaSettings