0

我的构建很简单:

  lazy val stampleWebProject = play.Project("stample-web", appVersion, appDependencies,path = file("stample-web"))
    .dependsOn(stampleCoreProject,stampleSearchProject)
    .aggregate(stampleCoreProject,stampleSearchProject)

  lazy val stampleCoreProject = Project(id = "stample-core",base = file("stample-core"))

  lazy val stampleSearchProject = Project(id = "stample-search",base = file("stample-search"))

所有这些项目都有一个带有依赖项的 build.sbt 文件,没有任何 scala 构建(据我所知,这将被忽略)

当我启动 SBT (12.4) 时,我得到以下信息:

[info] Set current project to stample-core (in build file:/home/sebastien/Bureau/Stample/)

> projects
[info] In file:/home/sebastien/Bureau/Stample/
[info]   * stample-core
[info]     stample-search
[info]     stample-web

> project stample-search
[info] Set current project to stample-search (in build file:/home/sebastien/Bureau/Stample/)

> projects
[info] In file:/home/sebastien/Bureau/Stample/
[info]     stample-core
[info]   * stample-search
[info]     stample-web

> project stample-core
[info] Set current project to stample-core (in build file:/home/sebastien/Bureau/Stample/)

> projects
[info] In file:/home/sebastien/Bureau/Stample/
[info]   * stample-core
[info]     stample-search
[info]     stample-web

> project stample-web
[info] Set current project to stample-search (in build file:/home/sebastien/Bureau/Stample/)
[stample-search] $ projects
[info] In file:/home/sebastien/Bureau/Stample/
[info]     stample-core
[info]     stample-search
[info]   * stample-web

[stample-search] $ compile
[info] Updating {file:/home/sebastien/Bureau/Stample/}stample-core...
[info] Resolving org.slf4j#slf4j-api;1.6.6 ...
[info] Done updating.
[info] Updating {file:/home/sebastien/Bureau/Stample/}stample-web...
[error] a module is not authorized to depend on itself: stample-search#stample-search_2.10;1.0
[error] (stample-web/*:update) java.lang.IllegalArgumentException: a module is not authorized to depend on itself: stample-search#stample-search_2.10;1.0
[error] Total time: 1 s, completed 26 août 2013 21:57:45

我不明白这里的一些东西:

  • 如何选择我们默认所在的项目。我似乎在 SBT 13.0 中添加了文档,但在 12.4 多构建文档中没有看到它。

  • 我怎么会输入项目stample-web,它告诉我我在stample-search

  • 为什么我的项目在我的 sbt 控制台中有一个特殊的显示(stample-web 或 stample-search,我真的不知道......)(这出现在这里:[stample-search] $ compile,这是相对于玩项目吗?

  • 为什么它不能编译stample-search,因为它在我的构建中不依赖于自身(我怀疑它试图编译Web项目但存在命名问题或其他问题?

这是一个 SBT 错误吗?如果是这样,是否可以将新的 13.0 版本与 Play 框架一起使用?

4

1 回答 1

5

Eugene Yokota 是对的:我在文件夹中存在冲突,该stample-web文件夹在 scala 构建中设置了 stample-web 名称,但是在包含的文件夹中有错误的 build.sbtname := stample-search

于 2013-08-28T18:53:59.063 回答