在 Eclipse 中为 Play 框架设置 sbteclipse
Setup sbteclipse in eclipse for Play framework
我是 Play 框架的新手。我跟着这个 link, installed successfully, but now I want to integrate project on eclipse. I viewed official link from play,但我不知道写在哪里
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")
和其他步骤。
我正在使用 Mac Os X 和 Eclipse Luna。
需要写在"project\plugins.sbt"文件中:
顺便说一句,如果您打算只使用 java(正如我从标签中看到的那样),那么您也可以将此行添加到 "build.sbt" 文件中:
// 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)
更新
@mkruz也给了很好的建议:
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
我是 Play 框架的新手。我跟着这个 link, installed successfully, but now I want to integrate project on eclipse. I viewed official link from play,但我不知道写在哪里
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")
和其他步骤。
我正在使用 Mac Os X 和 Eclipse Luna。
需要写在"project\plugins.sbt"文件中:
顺便说一句,如果您打算只使用 java(正如我从标签中看到的那样),那么您也可以将此行添加到 "build.sbt" 文件中:
// 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)
更新
@mkruz也给了很好的建议:
Use a text-editor and modify
project/plugins.sbt
andbuild.sbt
like described above and then runactivator eclipse
orsbt eclipse
. You should then be able to import the project in Eclipse viaFile -> Import -> Existing Projects into Workspace