我試圖添加一個非播放Java項目作爲子項目。主項目是Play Java應用程序,子項目與主項目位於同一目錄中。我遵循給予here的指示。我build.sbt看起來像Play Framework 2.2.1 - 添加非播放Java項目作爲子項目
import play.Project._
name := "main-project"
version := "1.0"
libraryDependencies ++= Seq(javaJdbc, javaEbean)
playJavaSettings
lazy val mainProject = project.in(file("."))
.aggregate(subProject)
.depends(subProject)
lazy val subProject = project.in(file("../sub-projects/sub-project-1"))
這裏是我的目錄結構
D:
|-- projects
| |-- main-project
| |-- sub-projects
| | | |-- sub-project-1
| | | |-- sub-project-2
當我嘗試編譯主體工程,我得到以下錯誤。
[info] Loading project definition from D:\projects\main-project\project
D:\projects\main-project\build.sbt:13: error: value depends is not a member of sbt.Project
possible cause: maybe a semicolon is missing before `value depends'?
.depends(subProject)
^
[error] sbt.compiler.EvalException: Type error in expression
[error] Use 'last' for the full log.
我已經提交pull請求來修復損壞的文檔和示例:https://github.com/playframework/playframework/pull/ 2453 –