在游戏2.1和之前我必须在Build.scala
中添加解析器,如:
val main = play.Project(appName, appVersion, appDependencies).settings(
resolvers += Resolver.url("Objectify Play Repository", url("http://schaloner.github.io/releases/"))(Resolver.ivyStylePatterns),
resolvers += Resolver.url("Objectify Play Snapshot Repository", url("http://schaloner.github.io/snapshots/"))(Resolver.ivyStylePatterns)
)
在2.2中我必须把它放在build.sbt
中:
...
resolvers += "Objectify Play Snapshot Repository" at "http://schaloner.github.com/snapshots/"
...
但这似乎不起作用,找不到依赖。
任何想法?
答案 0 :(得分:12)
您正在将其添加为maven存储库,但在您的旧配置中,您说它是常春藤存储库,我认为它应该是这样的:
resolvers += Resolver.url("Repo-name", url("http://example.com/"))(Resolver.ivyStylePatterns)
在解析器上查看sbt 0.13(使用2.2使用的)文档以获取更多信息: http://www.scala-sbt.org/release/docs/Detailed-Topics/Resolvers.html
答案 1 :(得分:4)
<强>更新强>
此解决方案不起作用,我在缓存中有依赖项。
我解决了这个问题:<强>项目/ plugins.sbt 强>:
// Comment to get more information during initialization
logLevel := Level.Warn
// The Typesafe repository
resolvers ++= Seq(
Resolver.url("Objectify Play Repository", url("http://schaloner.github.io/releases/"))(Resolver.ivyStylePatterns),
"Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
)
// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.0")
然后我可以在 build.sbt :
中添加依赖项name := "test"
version := "1.0-SNAPSHOT"
libraryDependencies ++= Seq(
javaJdbc,
javaEbean,
cache,
"be.objectify" %% "deadbolt-java" % "2.2-RC1"
)
play.Project.playJavaSettings
答案 2 :(得分:0)
为了将来参考,只需在build.sbt
检查http://www.playframework.com/documentation/2.2.x/Build
name := "my-app"
version := "1.0-SNAPSHOT"
libraryDependencies ++= Seq(
...
)
play.Project.playJavaSettings
resolvers += "itext repository" at "http://jasperreports.sourceforge.net/maven2/"