gpt4 book ai didi

java - 在 Eclipse 中为 Play 框架设置 sbteclipse

转载 作者:行者123 更新时间:2023-11-30 06:54:38 25 4
gpt4 key购买 nike

我是 Play 框架的新手。我跟着这个 link ,安装成功,但是现在想在eclipse上集成项目。我查看了official link从玩,但我不知道在哪里写

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

和其他步骤。

我正在使用 Mac Os X 和 Eclipse Luna。

最佳答案

需要写在“project\plugins.sbt”文件中:

enter image description here

顺便说一句,如果您打算只使用 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

关于java - 在 Eclipse 中为 Play 框架设置 sbteclipse,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36177158/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com