为什么SecureSocial和Play 2.3.2中的Unresolved Dependencies错误?

时间:2014-09-25 14:10:04

标签: java scala sbt playframework-2.3 securesocial

我正在编写Play 2.3.2应用程序(使用Java)。 在我的项目中,我现在需要使用安全的社交(主)模块。 但是当我键入激活器运行命令时,我得到以下错误:

[info] Resolving ws.securesocial#securesocial_2.11;1.0-SNAPSHOT ...
[warn]  module not found: ws.securesocial#securesocial_2.11;1.0-SNAPSHOT
[warn] ==== local: tried
[warn]   /home/giacomo/.ivy2/local/ws.securesocial/securesocial_2.11/1.0-SNAPSHOT/ivys/ivy.xml
[warn] ==== activator-local: tried
[warn]   file:/home/giacomo/stage/bdrim/repository/ws.securesocial/securesocial_2.11/1.0-SNAPSHOT/ivys/ivy.xml
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/ws/securesocial/securesocial_2.11/1.0-SNAPSHOT/securesocial_2.11-1.0-SNAPSHOT.pom
[warn] ==== typesafe-releases: tried
[warn]   http://repo.typesafe.com/typesafe/releases/ws/securesocial/securesocial_2.11/1.0-SNAPSHOT/securesocial_2.11-1.0-SNAPSHOT.pom
[warn] ==== typesafe-ivy-releasez: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/ws.securesocial/securesocial_2.11/1.0-SNAPSHOT/ivys/ivy.xml
[warn] ==== Typesafe Releases Repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/ws/securesocial/securesocial_2.11/1.0-SNAPSHOT/securesocial_2.11-1.0-SNAPSHOT.pom
[warn] ==== sonatype-snapshots: tried
[warn]   https://oss.sonatype.org/content/repositories/snapshots/ws/securesocial/securesocial_2.11/1.0-SNAPSHOT/securesocial_2.11-1.0-SNAPSHOT.pom
[warn] ==== SecureSocial Repository: tried
[warn]   http://securesocial.ws/repository/snapshots/ws.securesocial/securesocial_2.11/1.0-SNAPSHOT/ivys/ivy.xml
[info] Resolving jline#jline;2.11 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: ws.securesocial#securesocial_2.11;1.0-SNAPSHOT: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: ws.securesocial#securesocial_2.11;1.0-SNAPSHOT: not found
[error] Total time: 9 s, completed Sep 25, 2014 4:01:16 PM

这是我的build.sbt文件:

name := "BigDataAnalysis"

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayJava)

scalaVersion := "2.11.1"

resolvers ++= Seq(
    Resolver.sonatypeRepo("snapshots"),
    Resolver.url("SecureSocial Repository", url("http://securesocial.ws/repository/snapshots/"))(Resolver.ivyStylePatterns)
)

libraryDependencies ++= Seq(
  javaJdbc,
  javaEbean,
  cache,
  javaWs,
  javaCore,
  "ws.securesocial" %% "securesocial" % version.value,
  "commons-collections" % "commons-collections" % "3.2.1",
  "commons-io" % "commons-io" % "2.4",
  "org.mongodb" % "mongo-java-driver" % "2.12.1",
  "org.jongo" % "jongo" % "1.0",
  "org.mindrot" % "jbcrypt" % "0.3m"
)

javaOptions in Test += "-Dconfig.file=conf/test.conf"

怎么了?没有人可以帮助我?

1 个答案:

答案 0 :(得分:3)

我之前从未使用过SecureSocial,所以我不能保证一个明确的答案,但似乎有两个问题。

首先,好像您用于Maven存储库的第二个URL不正确(http://securesocial.ws/repository/snapshots/会产生404)。但这并不是致命的错误,因为根据the docs,SecureSocial位于Maven Central。

第二个更大的问题是您似乎要求使用SecureSocial版本来匹配您自己项目的版本("ws.securesocial" %% "securesocial" % version.value)。您可能不希望这样做,除非您想将项目的版本控制固定到SecureSocial。

它可能会解决您使用SecureSocial文档中引用的库依赖项字符串之一的问题:

"ws.securesocial" %% "securesocial" % "2.1.4"如果您想要最新版本,或"ws.securesocial" %% "securesocial" % "master-SNAPSHOT"如果您想要最新快照。