Project Setup

Modules and Artifacts

Unfiltered’s core, binding, server, and other modules are published with references to their underlying dependencies, so that applications need only explicitly depend on Unfiltered and other top-level dependencies. Keep in mind that server modules and binding modules are not generally co-dependent, so that if you are using for example unfiltered-jetty, you will also need to specify unfiltered-filter.

Each module is cross-built against several versions of Scala and published to the sonatype repository with the organization-id “ws.unfiltered”. The modules have the Scala version they are built against appended. For Scala 2.12+, the full artifact names are as follows:

  • unfiltered_2.12
  • unfiltered-filter_2.12
  • unfiltered-filter-async_2.12
  • unfiltered-netty_2.12
  • unfiltered-netty-websockets_2.12
  • unfiltered-jetty_2.12
  • unfiltered-netty-server_2.12
  • unfiltered-uploads_2.12
  • unfiltered-util_2.12
  • unfiltered-specs2_2.12
  • unfiltered-scalatest_2.12
  • unfiltered-json4s_2.12
  • unfiltered-oauth_2.12

Build Tools

Configuring sbt projects

When using sbt with binary dependencies it’s best to have the Scala version automatically appended so it will always match your project’s. In an sbt project:

libraryDependencies += "ws.unfiltered" %% "unfiltered-filter" % "0.9.0"

Maven

For Maven, specify the full artifact name:

<dependency>
  <groupId>ws.unfiltered</groupId>
  <artifactId>unfiltered-filter_2.12</artifactId>
  <version>0.9.0</version>
</dependency>

To use source dependencies with Maven, your best bet is to check out the project as a submodule.

Template Projects

For a new project the easiest the easiest option to apply a giter8 template for the Unfiltered backend of your choice.

So for example:

g8 unfiltered/unfiltered-netty --name=justplayin
cd justplayin
sbt # *or whatever your 0.11.x command is
> run