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:
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.10.4"
For Maven, specify the full artifact name:
<dependency> <groupId>ws.unfiltered</groupId> <artifactId>unfiltered-filter_2.12</artifactId> <version>0.10.4</version> </dependency>
To use source dependencies with Maven, your best bet is to check out the project as a submodule.
For a new project the easiest the easiest option to apply a giter8 template for the Unfiltered backend of your choice.
- unfiltered/unfiltered.g8 for embedded Jetty
- unfiltered/unfiltered-scalate.g8 for Scalate template evaluation
- unfiltered/unfiltered-war.g8 for a servlet container
- unfiltered/unfiltered-netty.g8 for Netty
- unfiltered/unfiltered-gae.g8 for Google App Engine
- unfiltered/unfiltered-slick.g8 using Slick for database interaction
So for example:
g8 unfiltered/unfiltered-netty --name=justplayin cd justplayin sbt # *or whatever your 0.11.x command is > run