O'Reilly logo

Getting Started with SBT for Scala by Shiti Saxena

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Compile, Test, and Run

There is much more to a Scala project built in SBT than just the build definition. This chapter talks about the various commands and options, such as logging, testing, and so on, that are provided by SBT.

Commands

What is a command? Every statement executed from the SBT prompt is a command. A command can either be an SBT task or command.

In SBT, each task represents a specific operation. Most of the tasks are run from the SBT prompt as commands while some are used internally by SBT. Based on the impact, tasks can be split into:

  • Project-level tasks
  • Configuration-level tasks

Tasks such as clean, update, publish, and so on, are categorized as project-level tasks, while tasks such as compile, console, run, test, run-main, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required