play.Project.playJavaSettings 出错

getting an error with play.Project.playJavaSettings

我有一个使用 play framework v2.3 的 Java 项目。我在 build.sbt 文件中有以下行:

play.Project.playJavaSettings

但是,现在我启动激活器时,出现以下错误:

[info] Loading project definition from /home/username/typesafe/testProj/project
/home/username/typesafe/testProj/build.sbt:60: error: object Project is not a member of package play
play.Project.playJavaSettings
     ^
[error] Type error in expression
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? 

我尝试了以下方法,但无法解决构建文件加载问题

playJavaSettings

删除该行有效。我仍在研究 Java 项目是否真的需要这条线。

playJavaSettings 在 Play 2.3 中不再可用,因为 Play 现在是通过自动插入机制添加的。检查 migration guide for 2.3,其中指出:

Play itself is now added using the auto plugin mechanism. The mechanism used in Play 2.2 where playJavaSettings and playScalaSettings were used has been removed. You now use one of the following instead

lazy val root = (project in file(".")).enablePlugins(PlayJava)