Skip to content

Set up Play project on Eclipse

Last Updated on 15/11/2020

This tutorial is going to show you how to set up a Play Framework 2.6 project on Eclipse IDE.

Pre-requisites

Sbteclipse plugin

First you need to install the sbteclipse plugin to enable the command sbt eclipse.

When declaring plugins you have the options of declaring them globally or at the project level, for the sake of simplicity we are going to declare it globally in our SBT installation.

Go to the <your_user>/.sbt/<version> folder. If you don’t have a plugins directory, create one:

mkdir plugins cd plugins

Inside of the plugins folder, create a new file called plugins.sbt with the following content:

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4")

Generate the Eclipse project

Inside of an existing Play project (check this tutorial if you don’t know how to create one), run the following command to add the Eclipse nature to your project:

sbt eclipse

Import the project on Eclipse

Finally, go to your Eclipse IDE an perform a File -> Import -> Existing Projects into Workspace and your Play project will be available for importing:

Set up Play project on Eclipse importing existing project

Hope it helps. Cya!

Leave a Reply

Your email address will not be published. Required fields are marked *