Play 项目有一个“项目”文件夹,如下所示:
- 项目
- 目标
- 项目
- 目标
我一直认为这只是我不应该想太多的生活奥秘之一,但今天我的好奇心战胜了我。
谷歌搜索给了我this其中提到顶级“project”文件夹用于 sbt 配置。我想知道为什么他们没有将其称为“.sbt”和“.git”,以及为什么在该文件夹之外仍然有一个文件“build.sbt”,但我认为让事情真正有意义并没有什么乐趣。
它也没有提到为什么它包含另一个“项目”文件夹。
为什么会有一个嵌套的“project”文件夹?
最佳答案
http://www.scala-sbt.org/0.13/tutorial/Organizing-Build.html :
build.sbt conceals how sbt really works. sbt builds are defined with Scala code. That code, itself, has to be built. What better way than with sbt?
The project directory is another build inside your build, which knows how to build your build. To distinguish the builds, we sometimes use the term proper build to refer to your build, and meta-build to refer to the build in project. The projects inside the metabuild can do anything any other project can do. Your build definition is an sbt project.
And the turtles go all the way down. If you like, you can tweak the build definition of the build definition project, by creating a project/project/ directory.
关于scala - SBT 目录结构。 "project"是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34254579/