无法运行喷涂示例

时间:2012-08-25 09:56:09

标签: scala sbt spray

我正在使用spray启动一个项目,并尝试按照他们的wiki运行他们的示例应用程序(在他们上启动我的项目)。 但是,我不能让它们工作,似乎自编写本文档以来,spb的sbt配置发生了很大的变化。

sbt "project spray-example-simple" shell我被拒绝时,instructions对我不起作用:

~/.../spray/project # sbt "project spray-can-examples" shell

[info] Set current project to default-951202 (in build file:/home/jolivier/projects/external/spray/project/)
[error] Not a valid project ID: spray-can-examples
[error] project spray-can-examples
[error]                           ^

虽然Build.scala(在同一文件夹中)包含具有此名称的项目:

  lazy val examples = Project("examples", file("examples"))
    .aggregate(sprayCanExamples, sprayClientExamples, sprayIoExamples, sprayServerExamples)
    .settings(exampleSettings: _*)

  lazy val sprayCanExamples = Project("spray-can-examples", file("examples/spray-can"))
    .aggregate(simpleHttpClient, simpleHttpServer)
    .settings(exampleSettings: _*)

所以我对为什么被sbt拒绝感到非常不安。我尝试在sbt project等其他几个文件夹上运行examples命令,但出现了同样的错误。我错过了什么?我对Set current project to default-951202感到非常不安,这对我来说不太好看,但我不知道如何解决这个问题。

提前致谢。

1 个答案:

答案 0 :(得分:1)

你应该从克隆的回购中运行sbt。根:

spray> sbt11 "project spray-can-examples" shell

spray是我克隆回购的文件夹。这里sbt11调用sbt-launch-0.11.2.jar

它运作得很好。

相关问题