Month: October 2016

Spark Summit Europe 2016

Intro ScalaDays 2016

For the second time now, the European version of the Spark Summit took place this year in Brussels after its inception last year in Amsterdam. I’ll give a short overview and summary of the talks I attended and what I gathered from speaking with attendees and companies. ▸ Read more...

Tagged with: , ,

Play’s Liaison with sbt

Have you ever wondered why you no longer play on the command line1, but execute sbt or activator? And why is Play only ever referred to in plugins.sbt and not your build.sbt’s libraryDependencies, but still, you can use its API in your code? And how does Play – run?

The sbt Plugin

The Playframework is separated into multiple modules, and with each new version, more parts of it are factored out into their own modules. The best known is simply called play – it contains the API that you as a developer interact with when developing a Play application.

The part that is running your application is actually an sbt plugin, and you can find it in the aptly named module sbt-plugin.

All plugins that your build uses must be specified in project/plugins.sbt, and are then in scope in each sub-project. To be more precise, Play is an auto-plugin2. As the name suggests, auto plugins can enable themselves automatically. Play does not use this feature however – because you want to specifically enable either the Scala or the Java plugin.

// Use Play with Scala lazy val root = (project in file(".")).enablePlugins(PlayScala) // Use Play with Java lazy val root = (project in file(".")).enablePlugins(PlayJava) ▸ Read more...