簡體   English   中英

在Eclipse中為Play框架設置sbteclipse

[英]Setup sbteclipse in eclipse for Play framework

我是Play框架的新手。 我跟隨此鏈接 ,安裝成功,但是現在我想在eclipse上集成項目。 我從游戲中查看了官方鏈接 ,但我不知道在哪里寫

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)

UPDATE

@mkruz也給出了很好的建議:

使用文本編輯器,並build.sbt修改project/plugins.sbtbuild.sbt ,然后運行activator eclipsesbt eclipse 然后,您應該能夠通過File -> Import -> Existing Projects into Workspace在Eclipse中將項目File -> Import -> Existing Projects into Workspace

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM