Getting Started with SBT for Scala

Getting Started with SBT for Scala
eBook: $19.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 15%!
Print + free eBook + free PacktLib access to the book: $52.98    Print cover: $32.99
save 38%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Table of Contents
Sample Chapters
  • Establish simple and complex projects quickly
  • Employ Scala code to define the build
  • Write build definitions that are easy to update and maintain
  • Customize and configure SBT for your project, without changing your project’s existing structure

Book Details

Language : English
Paperback : 86 pages [ 235mm x 191mm ]
Release Date : September 2013
ISBN : 1783282673
ISBN 13 : 9781783282678
Author(s) : Shiti Saxena
Topics and Technologies : All Books, Application Development, Web Development, Open Source

Table of Contents

Chapter 1: Hello World with SBT
Chapter 2: .sbt Build Definitions
Chapter 3: Dependency Management
Chapter 4: Full Build Definitions
Chapter 5: Compile, Test, and Run
  • Chapter 1: Hello World with SBT
    • Why SBT?
    • Installing SBT
      • Installing from a package
        • Installing on Mac
      • Installing SBT manually
    • Creating a new project
    • Compiling, testing, and running your project
    • Going interactive with the SBT shell
      • Triggering SBT commands on saves
    • Summary
      • Chapter 3: Dependency Management
        • Quick introduction to Maven or Ivy dependency management
          • How Ivy works
            • Resolve
            • Retrieve
            • Publish
        • Dependency management in SBT
          • Automatic dependency management
            • Declaring dependencies in the build definition
            • Dependencies using Maven files
            • Dependencies using Ivy files or Ivy XML
            • Adding JAR files manually
        • Resolvers
        • Summary

            Shiti Saxena

            Shiti Saxena is a software engineer with around three years of work experience. She is currently working with Imaginea (a business unit of Pramati). She has also previously worked with Tata Consultancy Services Ltd. and Genpact. A true polyglot, she has experience with various languages including Scala, JavaScript, Java, Python, Perl, and C. She also likes to work with Play Scala and AngularJS. She blogs at and maintains open source projects at GitHub. In her spare time, she loves to travel, watch movies, and likes to spend time playing her piano.
            Sorry, we don't have any reviews for this title yet.

            Code Downloads

            Download the code and support files for this book.

            Submit Errata

            Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


            - 2 submitted: last submission 17 Jan 2014

            Errata Type: Typo | Page No: 23

            parallelExecution in (Test, RunTime) := false
            Should be parallelExecution in (Test, Runtime) := false

            Errata type: Technical | Page No: 22


            An extra line has to be added to the information box above the heading "Working with scopes":

            When quotes are not given, space is the delimiter.

            Sample chapters

            You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

            Frequently bought together

            Getting Started with SBT for Scala +    Haskell Data Analysis Cookbook =
            50% Off
            the second eBook
            Price for both: £23.85

            Buy both these recommended eBooks together and get 50% off the cheapest eBook.

            What you will learn from this book

            • Explore the internal workings of SBT
            • Uncover the various settings that play a significant role in the build
            • Understand the different ways of managing project dependencies
            • Learn how to customize the build to suit your project requirements
            • Leverage the features of SBT to simplify the build process
            • Configure the build for a multi-project with or without dependencies on different modules

            In Detail

            Build tools are a boon to developers working on large projects. With the configuration to run/execute the project moved out, developers can focus more on the project. SBT is a build tool designed for Scala and Java projects. It provides developers with a high productivity work environment hence it comes in really handy when dealing with large projects.

            Getting Started with SBT for Scala gets you going with using SBT and also introduces its advanced concepts. SBT is a build tool that uses a Scala-based DSL. Additionally, SBT has some interesting features that come in handy during development, such as starting a Scala REPL with project classes and dependencies on the classpath, continuous compilation and testing with triggered execution, and much more.

            Getting Started with SBT for Scala introduces SBT and its various features. It shows how to set up the build definition for a Scala project using sample code to explain different scenarios and use cases. It explains the basic configuration required to compile, test, and run a project using SBT. We will take a look at the additional configuration and settings that can be set to suit the project requirements. You will also learn how to handle project dependencies in SBT and use Scala files to define the build. It shows how to fork the JVM in SBT for different processes and specific configurations. It also explains the intricacies of the build definition, parallel execution.

            This book will make you familiar with SBT so that you can use it for different kinds of projects like simple, and multiple modules which can be dependent or independent.


            A practical and fast-paced guide, Getting Started with SBT for Scala walks you through the setup of Scala projects in SBT with sample code for common as well as critical scenarios.

            Who this book is for

            Getting Started with SBT for Scala is for developers working on Scala projects who are interested in learning and utilizing Simple Build Tool to manage the build process.

            Code Download and Errata
            Packt Anytime, Anywhere
            Register Books
            Print Upgrades
            eBook Downloads
            Video Support
            Contact Us
            Awards Voting Nominations Previous Winners
            Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
            Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software