无法解析邮件程序和util插件[2.2 java]

时间:2013-12-26 06:09:08

标签: java playframework playframework-2.0 securesocial

我是新玩的2.2框架。我开始使用安全的社交插件,并且在编译期间我有未解析的依赖项。

sbt.ResolveException: unresolved dependency: com.typesafe#play-plugins-util_2.10;2.2.0: not found
[error] unresolved dependency: com.typesafe#play-plugins-mailer_2.10;2.2.0: not found

我的build.sbt的内容是:

libraryDependencies ++= Seq(
  javaJdbc,
  javaEbean,
  cache,
  "mysql" % "mysql-connector-java" % "5.1.18",
   "com.typesafe" %% "play-plugins-util" % "2.1",
   "com.typesafe" %% "play-plugins-mailer" % "2.1",
   "securesocial" %% "securesocial" % "master-SNAPSHOT"
)


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

resolvers += Resolver.url("typesafe plugins", new URL("http://repo.typesafe.com/typesafe/releases/"))(Resolver.ivyStylePatterns)

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

和play.plugins是

1000:org.jooq.play.JooqPlugin
150000:com.typesafe.plugin.CommonsMailerPlugin
9994:securesocial.core.DefaultAuthenticatorStore
9995:securesocial.core.DefaultIdGenerator
9996:securesocial.core.providers.utils.DefaultPasswordValidator
9997:securesocial.controllers.DefaultTemplatesPlugin
9998:your.user.Service.Implementation <-- Important: You need to change this
9999:securesocial.core.providers.utils.BCryptPasswordHasher
10004:securesocial.core.providers.UsernamePasswordProvider

我也尝试下载这些jar并将它们放在lib文件夹中。这是一个已知的问题?如果有人能帮我解决这个问题会很棒。另外,就像在rails中一样,我们如何强制将插件安装到给定的路径,如bundle install --path=.path

1 个答案:

答案 0 :(得分:0)

以下build.sbt应该有效:

name := """hello-play"""

version := "1.0-SNAPSHOT"

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

libraryDependencies ++= Seq(
  javaJdbc,
  javaEbean,
  cache,
  "mysql" % "mysql-connector-java" % "5.1.18",
  "com.typesafe" %% "play-plugins-util" % "2.2.0",
  "com.typesafe" %% "play-plugins-mailer" % "2.2.0",
  "securesocial" %% "securesocial" % "master-SNAPSHOT"
)

play.Project.playScalaSettings