如果我按照github上的说明https://github.com/joscha/play-authenticate/blob/master/samples/java/Getting%20Started.md
,似乎没有安装“play-authentication”插件我的eclipse IDE无法找到以“com.feth”开头的软件包。 我将依赖项添加到Scala.build,如上面的自述文件中所述,然后运行clean和dependencies然后compile ..但找不到com.feth包。这意味着play-auth插件未正确安装。 我想知道是否有办法正确安装play-authenticate模块。我在上面的自述文件中提到了什么? 似乎deadbolt-2和play-authenticate的依赖关系都没有得到解决和安装。我还在Scala.Build中的依赖项声明中注释了'%%'。但即使我使用单个'%',依赖关系也无法解决,也没有安装插件。 非常感谢任何帮助
我的/project/Scala.Build文件如下:
import sbt._
import Keys._
import PlayProject._
object ApplicationBuild extends Build {
val appName = "r2s2"
val appVersion = "1.0-SNAPSHOT"
val appDependencies = Seq(
"play-aws" % "play-aws_2.9.1" % "0.1",
"be.objectify" %% "deadbolt-2" % "1.1.3-SNAPSHOT",
"com.feth" %% "play-authenticate" % "0.2.3-SNAPSHOT"
)
val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings(
resolvers += Resolver.url("Objectify Play Repository", url("http://schaloner.github.com/releases/"))(Resolver.ivyStylePatterns),
resolvers += Resolver.url("Objectify Play Repository", url("http://schaloner.github.com/snapshots/"))(Resolver.ivyStylePatterns),
resolvers += Resolver.url("play-easymail (release)", url("http://joscha.github.com/play-easymail/repo/releases/"))(Resolver.ivyStylePatterns),
resolvers += Resolver.url("play-easymail (snapshot)", url("http://joscha.github.com/play-easymail/repo/snapshots/"))(Resolver.ivyStylePatterns),
resolvers += Resolver.url("play-authenticate (release)", url("http://joscha.github.com/play-authenticate/repo/releases/"))(Resolver.ivyStylePatterns),
resolvers += Resolver.url("play-authenticate (snapshot)", url("http://joscha.github.com/play-authenticate/repo/snapshots/"))(Resolver.ivyStylePatterns),
resolvers += "Local Play Repository" at "/home/othman/play-2.0.4/repository/local"
)
}
答案 0 :(得分:3)
当您向游戏项目添加新的依赖项时,首先您必须使用“重新加载”命令从互联网下载更新的jar,之后才开火 再次' eclipse '命令重新创建与eclipse相关的配置文件。然后你应该能够在你的eclipse类路径上找到更新的jar。
希望它有所帮助!
答案 1 :(得分:1)
在尝试将play-authentication依赖项添加到我的项目时,我遇到了与Play-2.2.1类似的问题。上面提到的Getting started guide建议使用这样的解析器:
resolvers += Resolver.url("play-authenticate (snapshot)", url("http://joscha.github.com/play-authenticate/repo/snapshots/"))(Resolver.ivyStylePatterns)
但我终于找到的是Resolver.ivyStylePatterns不起作用!通过此设置,我总是遇到“无法解决的依赖关系”错误。
对我有用的解决方案:
resolvers += Resolver.url("play-authenticate (snapshot)", url("http://joscha.github.io/play-authenticate/repo/snapshots/"))( Patterns("com.feth/[module]/[revision]/[type]s/[artifact].[ext]") )
变更清单和要点:
答案 2 :(得分:0)
如果更改Build.scala,则必须使用reload命令重新启动播放环境。
答案 3 :(得分:0)
听起来像你没有在正确的位置复制'com'文件夹,这会导致错误。它应该被复制到/ app / com中。不确定这是否是您的问题,您可以正确完成此操作。