Fork me on GitHub

Building and Using Modules

Play2 is extensible using modules. The play2-maven-plugin supports the packaging and the inclusion of modules.

Importing a Module

Play2 modules are just libraries. So, you can use a module by declaring it in your pom file:

The dependency must be in the _compile_ scope.

Building a Module

A Play 2 module is just a Play 2 application without a route file. To build a module, just use the plugin as usual. If you want to optimize the process, disable the distribution packaging (as a module is not a complete application):