SBT不想进入我的项目(使用project命令) [英] SBT does not want to enter my project (using project command)

查看:30
本文介绍了SBT不想进入我的项目(使用project命令)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的构建很简单:

  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 构建(据我所知会被忽略)

All these projects have a build.sbt file with dependencies, without any scala build (which would be ignored as far as I know)

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

When I start SBT (12.4), I get the following:

[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

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

I do not understand some stuff here:

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

  • How is choosen the project in which we are by default. I've seem documentation was added in SBT 13.0 but did not see it in the 12.4 multibuild documentation.

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

How comes I type project stample-web and it tells me I'm in stample-search

为什么我的 sbt 控制台中有我所在项目的特殊显示(stample-web 或stample-search,我真的不知道...)(这出现在这里:[stamp-search] $ compile,这和play项目有关系吗?

Why is there a special display in my sbt console for the project I'm in (stample-web or stample-search, I don't really know...) (this appears here: [stample-search] $ compile, is this relative to play projects?

为什么它不能编译stample-search,因为它在我的构建中不依赖于它自己(我怀疑它试图编译web项目,但存在命名问题之类的?

Why it can't compile stample-search, since it doesn't depend on itself in my build (I suspect it tries to compile the web project but there's a naming problem or something?

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

Is this an SBT bug. If so, is it possible to use the new 13.0 version with Play framework?

推荐答案

Eugene Yokota 是对的:我在 stample-web 文件夹中有冲突,该文件夹在scala 构建,但它在具有 name := stample-search

Eugene Yokota is right: I have a conflict in the stample-web folder, which was set the stample-web name in the scala build, but it has a wrong build.sbt in the folder which has name := stample-search

这篇关于SBT不想进入我的项目(使用project命令)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆