[英]Setup sbteclipse in eclipse for Play framework
I am new in Play framework. 我是Play框架的新手。 I followed by this link , installed successfully, but now I want to integrate project on eclipse.
我跟随此链接 ,安装成功,但是现在我想在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. 我正在使用Mac Os X和Eclipse Luna。
You need to write it in the "project\\plugins.sbt" file: 您需要将其写入“ project \\ plugins.sbt”文件中:
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: 顺便说一句,如果您打算仅使用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)
UPDATE UPDATE
@mkruz gave a good advice as well: @mkruz也给出了很好的建议:
Use a text-editor and modify
project/plugins.sbt
andbuild.sbt
like described above and then runactivator eclipse
orsbt eclipse
.使用文本编辑器,并
build.sbt
修改project/plugins.sbt
和build.sbt
,然后运行activator eclipse
或sbt eclipse
。 You should then be able to import the project in Eclipse viaFile -> Import -> Existing Projects into Workspace
然后,您应该能够通过
File -> Import -> Existing Projects into Workspace
在Eclipse中将项目File -> Import -> Existing Projects into Workspace
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.