我正在尝试将非Play Java项目添加为子项目。主项目是Play Java Application,子项目与main-project位于同一目录中。我正在按照here给出的指示。我的build.sbt看起来像
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.
答案 0 :(得分:1)
应该{{1}}而不是dependsOn
。
您还应该指向文件夹根目录中的两个项目:
depends