Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setup sbteclipse in eclipse for Play framework

I am new in Play framework. I followed by this link, installed successfully, but now I want to integrate project on eclipse. I viewed official link from play, but I do not understand where to write

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

and other steps.

I am using Mac Os X and Eclipse Luna.

like image 881
Vinit Solanki Avatar asked May 31 '26 14:05

Vinit Solanki


1 Answers

You need to write it in the "project\plugins.sbt" file:

enter image description here

btw, if you are planning to use only java (as I see from the tag) then you can add this lines to the "build.sbt" file as well:

// Compile the project before generating Eclipse files,
// so that generated .scala or .class files for views and routes are present
EclipseKeys.preTasks := Seq(compile in Compile)

// Java project. Don't expect Scala IDE
EclipseKeys.projectFlavor := EclipseProjectFlavor.Java

// Use .class files instead of generated .scala files for views and routes
EclipseKeys.createSrc := EclipseCreateSrc.ValueSet(EclipseCreateSrc.ManagedClasses, EclipseCreateSrc.ManagedResources)

UPDATE

@mkruz gave a good advice as well:

Use a text-editor and modify project/plugins.sbt and build.sbt like described above and then run activator eclipse or sbt eclipse. You should then be able to import the project in Eclipse via File -> Import -> Existing Projects into Workspace

like image 116
Andriy Kuba Avatar answered Jun 03 '26 03:06

Andriy Kuba



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!