我想使用http://dispatch.databinder.net/Dispatch.html。
该网站表明我必须将其添加到project/plugins.sbt
:
libraryDependencies += "net.databinder.dispatch" %% "core" % "0.9.1"
我做了。然后我重新启动了播放控制台和compile
d。
导入无效:
import dispatch._
猜猜我一直很傻,但是在使用Java时我从未使用过构建系统。
如何触发下载/构建软件包的过程?罐子(或等同物)储存在哪里;我可以重用它们吗?该软件包何时可供Play应用程序使用?
答案 0 :(得分:4)
表示你应该将其添加到project/plugins.sbt
。那是错误的地方。它表示要在项目的根目录中添加build.sbt
文件。作为Play项目,project/Build.scala
可能更合适 - 我不知道它是否会从build.sbt
获取设置。
添加the dependency in your Build.scala:
val appDependencies = Seq(
"net.databinder.dispatch" %% "core" % "0.9.1"
)
答案 1 :(得分:0)
您可能需要运行sbt update。
来自sbt Command Line Reference:
update Resolves and retrieves external dependencies as described in library dependencies.