简体   繁体   中英

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.

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

在此处输入图片说明

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM