新Play 2.0-beta
中没有 eclipsify 操作如何在Eclipse中编辑项目?
答案 0 :(得分:11)
使用最新版本的Play 20,请按以下步骤操作:
play
eclipsify
目标就这么简单!
请注意,最好在Eclipse下运行时将Play作为play ~ run
运行。
最后一点,如果您使用 ScalaIDE ,可以在http://scala-ide.org/docs/tutorials/play20scalaide20/index.html找到分步说明
答案 1 :(得分:9)
更新:此答案已弃用。
编辑文件project/plugins.sbt
,添加以下内容:
resolvers += Classpaths.typesafeResolver
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse" % "1.5.0")
打开SBT控制台:
play
,SBT提示符应显示compile
以预编译应用eclipse
生成eclipse项目文件打开Eclipse:
File -> Import… -> Existing projects into Workspace
您应该看到项目文件出现在项目资源管理器中。
现在让我们解决编译问题:
Properties
,然后选择Java Build Path
Add Class Folder…
target/scala-2.9.1/classes
和target/scala-2.9.1/classes_managed
Java Build Path
点击Add external JARs…
play\repository\local\org.scala-lang\scala-library\2.9.1\jars\scala-library.jar
现在一切都应该编译。
PS:credits
答案 2 :(得分:4)
在Play上的较新版本中,命令为play eclipse