niels
niels

Reputation: 7309

How to setup eclipse-ide work on the playframework 2.0

On Github there is an description how to build the framework from scratch. How ever I want to understand how somethings work internally so I want to setup the Eclipse-IDE to make this as comfortable as possible. Has anyone a description how this can be easily done?

To make it clear, I don't want to know how to setup eclipse for working on play-project.

Upvotes: 9

Views: 5535

Answers (3)

niels
niels

Reputation: 7309

THIS SOLUTION WAS FOR PLAY 2.0, you can't use it directly in 2.1! at least the command build-repository isn't valid anymore.

git clone git://github.com/playframework/Play20.git

Add

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

to play20/framework/project/plugins.sbt, so you get

logLevel := Level.Warn

resolvers += Classpaths.typesafeResolver

addSbtPlugin("com.typesafe.sbtscalariform" % "sbtscalariform" % "0.3.0")

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

Then make the normal build processes.

$ cd Play20/framework
$ ./build
> build-repository
> eclipse

Create a Scala-IDE give her enough Space, choose the 64-bit variant if you can!

Import projects from play20/framework/src

Add /Play/target/scala-2.9.1/src_managed/main as source folder.

You will end up with less than 10 compilation errors :-(, but will have the most of the code in eclipse.

Upvotes: 6

virtualeyes
virtualeyes

Reputation: 11237

When building against 2.1 snapshot, Eclipse keeps the .ivy2/cache jar of play 2.0.1, which is where, in my case the errors were coming from.

The solution is to remove play 2.0.1 jar from eclipse build path, and add in the 2.1 snapshot jar that you build (in your-play20/repository/local/play/play_2.9.1/2.1-SNAPSHOT/jars)

Got an error free Eclipse + Scala-IDE setup, nice ;-)

Upvotes: 1

Jan
Jan

Reputation: 1777

Take a look at the Sbt eclipse Plugin. It will generate an eclipse project for you. It should be rather easy. Just follow the instruction on the plugins git page. Regards. Jan

Upvotes: 0

Related Questions