我的构建很简单:
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控制台中有一个特殊的显示器用于我所在的项目(例如 - 网络或搜索 - 搜索,我真的不知道......)(这里显示:{{1这是相对于游戏项目吗?
为什么它不能编译stample-search,因为它在我的构建中不依赖于它自己(我怀疑它试图编译web项目但是有一个命名问题或什么?
< / LI>这是一个SBT错误。如果是这样,是否可以将新的13.0版本与Play框架一起使用?
答案 0 :(得分:5)
stample-web
文件夹中存在冲突,该文件夹在scala版本中设置了stample-web名称,但在文件夹中有一个错误的build.sbt {{1 }}