Chapter 5Maven

While Scala has established itself as the de facto language of choice in certain areas, for example streaming analytics, many organizations still carry a technological or political legacy that prevents wholesale tooling and language transitions. In this situation incremental change is your ally. In concrete terms, you might not be able to use SBT and Scala, but if you are already working in a Maven based environment you can add Scala and learn how to coexist with Java source code in the same project with little disruption. Using Scala with Maven requires no additional installation activities, thereby preserving any current Jenkins builds you might have configured.

In this chapter, you will learn how to work with Maven to manage your Scala-based project. Along the way, you can see how Maven is extended to support Scala to a similar level as Java, how you can use Scala at an interactive prompt, and how you can slash compile times via configuration.

This chapter recognizes that no build lifecycle is complete without a dash of testing, so you will find out how to integrate ScalaTest with the assistance of Maven. You will learn how to leverage the power of compilation as a service, and see how Java and Scala sources can be combined in the same project.

GETTING STARTED WITH MAVEN AND SCALA

This chapter assumes ...

Get Professional Scala now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.