Chapter 2. Structure and Configuration of Simple Build Tool (SBT)
After the previous chapter, you should know how to create a simple project with Simple Build Tool, or SBT. Obviously there is more to this bleeding-edge utility.
“Bleeding edge” is the best way to describe SBT. Its 1.0 version is still under development. At the time of writing this book, we are looking at version 0.11.2. This book is authored using version 0.11.0. The differences are immense between the two development versions. Please refer to the wiki on github for the latest in SBT.
Directories in SBT
The directories in SBT are styled after the Maven build convention. This avoids confusion and helps any seasoned Java developer to get started with SBT. Run
tree at your command prompt in project root’s src/ directory (which works across the board on Windows, Linux, and Mac OS X) you can see the folder setup of
The src directory has two children, main and test. main is where the production code will reside, and test is where the test code will reside. Each of these directories contains a resources directory, which contains any dependent files required either by the test or production code. These files can be META-INF configuration files, images, properties, etc.
├── src │ ├── main │ │ ├── java │ │ │ └── com │ │ │ └── oreilly │ │ │ └── testingscala │ │ ├── resources │ │ └── scala │ │ └── com │ │ └── oreilly │ │ └── testingscala │ │ ├── Album.scala │ │ └── Artist.scala ...