Chapter 1. Why sbt?
This chapter covers
- Why use a build tool?
- Apache Ant
- Apache Maven
- Why sbt?
- Interactivity/reactivity of sbt
In this chapter we’re going to explore why someone would use sbt (Simple Build Tool) to give a bit of a background to this book. If you’re convinced that you need to use sbt, you can probably skip this chapter. We’ll cover why you’d want an automated build and what other options you have for Scala and Java development. Finally, we’ll compare these other options to sbt and show why we think sbt is a good option for a large range of builds but especially for Scala builds.
For the impatient: sbt is a build tool that creates a stable build platform and increases developer productivity by taking the good ideas from other build tools such as
- Minimal configuration—default project layouts
- A number of built-in tasks (test, compile, publish)
- A reactive development environment. (You change your source code, and sbt reruns your tests.)
- Allowing developers to use the Scala REPL on their projects.
- Faster compilation through incremental compilation and caching.
- Automatic recompilation with different versions of Scala.
Let’s start at the beginning.