为什么在SecureSocial和Play 2.3.2中出现“未解决的依赖关系"错误? [英] Why is the Unresolved Dependencies error with SecureSocial and Play 2.3.2?

查看:130
本文介绍了为什么在SecureSocial和Play 2.3.2中出现“未解决的依赖关系"错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

i'm writing a Play 2.3.2 application (using Java). In my project now i need to use secure social (master) module. But when i type the activator run command i get the following errors:

[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文件:

This is my build.sbt file:

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"

怎么了?没人可以帮我吗?

What's wrong?? Nobody can help me??

推荐答案

我以前从未使用过SecureSocial,因此无法保证给出确切的答案,但是似乎有两个问题.

I've never used SecureSocial before, so I can't promise a definitive answer, but there appear to be two problems.

首先,似乎您用于Maven存储库的第二个URL不正确( http ://securesocial.ws/repository/snapshots/的结果为404).不过,这并不是致命错误,因为根据文档所述,SecureSocial位于Maven Central中.

First of all, it appears as though the second URL you're using for the Maven repository is incorrect (http://securesocial.ws/repository/snapshots/ results in a 404). That's not the fatal error though, because according to the docs, SecureSocial is in Maven Central.

第二个更大的问题是您似乎在请求SecureSocial的版本以匹配您自己项目的版本("ws.securesocial" %% "securesocial" % version.value).除非您想将项目的版本固定到SecureSocial,否则您可能不想这样做.

The second, larger problem is that you appear to be requesting a version of SecureSocial to match the version of your own project ("ws.securesocial" %% "securesocial" % version.value). You probably don't want to do this, unless you want to pin your project's versioning to SecureSocial.

使用SecureSocial的文档中提到的库依赖项字符串之一可以解决您的问题:

It may resolve your issue to use one of the library dependency strings referred to in SecureSocial's docs:

"ws.securesocial" %% "securesocial" % "2.1.4"(如果要使用最新版本),或"ws.securesocial" %% "securesocial" % "master-SNAPSHOT"(如果要使用最新快照).

"ws.securesocial" %% "securesocial" % "2.1.4" if you want the latest version, or "ws.securesocial" %% "securesocial" % "master-SNAPSHOT" if you want the latest snapshot.

这篇关于为什么在SecureSocial和Play 2.3.2中出现“未解决的依赖关系"错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆