如何在独立应用程序中声明对Play的Anorm依赖?

8
当前在独立模式下使用Play的最新版本(如2.3或2.4)的anorm包的sbt语法是什么?

@applicius 在下面完美地解决了它。 - theglauber
2个回答

11

build.sbt 文件中:

resolvers ++= Seq(
  "Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases/")

libraryDependencies ++= Seq(
  "com.typesafe.play" %% "anorm" % "2.3.6")

参见示例


是的,我认为这是我通过谷歌找到的例子之一。它不起作用:[warn] Host repo.typeseafe.com not found. url=http://repo.typeseafe.com/typesafe/releases/com/typesafe/play/anorm_2.11/2.3.2/anorm_2.11-2.3.2.pom [info] You probably access the destination server through a proxy server that is not well configured.sbt.ResolveException: unresolved dependency: com.typesafe.play#anorm_2.11;2.3.2: not found - theglauber
它确实可以工作,所以你的问题可能出在其他地方。https://travis-ci.org/cchantep/acolyte/builds/31466513。请检查您的网络配置和/或可能的HTTP代理。 - cchantep
我创建了一个只包含这个依赖项的 build.sbt,并将结果粘贴在我的问题上方。 - theglauber
5
也许你应该写repo.typesafe.com(如答案中所示),而不是repo.typeseafe.com - cchantep

1

Anorm现在已经发布,不需要额外的解析器。

"org.playframework.anorm" %% "anorm" % "2.6.2"

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接