O'Reilly logo

Play Framework Cookbook - Second Edition by Giancarlo Inductivo, Alexander Reelsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Managing module dependencies

In this recipe, we will tackle the topic of adding Play modules to your Play 2.0 application, which further demonstrates how powerful the Play 2.0 ecosystem is. This recipe requires the previous recipe to be run and assumes that you have followed on.

How to do it…

For Java, we need to perform the following steps:

  1. Run the foo_java application with Hot-Reloading enabled:
        activator "~run"
  2. Add the fooscala user-contrib module as a project dependency in build.sbt:
        "fooscala" %% "user-contrib" % "1.0-SNAPSHOT",
        "foojava" %% "product-contrib" % "1.0-SNAPSHOT"
  3. Modify foo_java/app/controllers/Application.java by adding the following action:
     // Add the required imports import productcontrib.services.ProductService; import productcontrib.services.ProductServiceImpl; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required