How to edit a Play 2.0 project using Eclipse

New Play 2.0-beta p> no eclipsify action

How to edit a project in Eclipse?

+7
source share
3 answers

In new versions on Play, the play eclipse team

+4
source

In the latest version of game 20, follow these steps:

  • cd to your application folder
  • type play
  • run eclipsify target
  • import project into eclipse

it's simple!

Please note that it is better to run Play as play ~ run when working in Eclipse.

The last time you use ScalaIDE , step-by-step instructions can be found at http://scala-ide.org/docs/tutorials/play20scalaide20/index.html p>

+11
source

Update: This answer has been deprecated.

Edit the project/plugins.sbt file, add the following:

 resolvers += Classpaths.typesafeResolver addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse" % "1.5.0") 

Open the SBT console:

  • cd to application folder
  • run play , SBT message appears
  • type compile to precompile the application
  • then eclipse to create the eclipse project files

Open Eclipse:

  • Choose File -> Import… -> Existing projects into Workspace
  • Select the application folder and click Finish .

You should see that the project files are displayed in the project explorer.

Now solve the compilation problems:

  • Right click on the project, select Properties , then Java Build Path
  • On the Libraries tab, click Add Class Folder…
  • Check target/scala-2.9.1/classes and target/scala-2.9.1/classes_managed
  • Return to Java Build Path click Add external JARs…
  • Select play\repository\local\org.scala-lang\scala-library\2.9.1\jars\scala-library.jar

Now everything should compile.

PS: loans

+9
source

All Articles