Playframework Can';t在播放子项目中使用sbt 0.13.7

Playframework Can';t在播放子项目中使用sbt 0.13.7,playframework,sbt,Playframework,Sbt,我有一个由两个子项目(common和common2)组成的项目: 在mainbuild.sbt中,对这两个子项目的依赖性定义为: lazy val common = (project in file("common")).enablePlugins(PlayJava) lazy val common2 = (project in file("common2")).enablePlugins(PlayJava) lazy val main = (project in file(".")).en

我有一个由两个子项目(common和common2)组成的项目:

在main
build.sbt
中,对这两个子项目的依赖性定义为:

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

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

lazy val main = (project in file(".")).enablePlugins(PlayJava)
                    .aggregate(common, common2).dependsOn(common, common2)
这一点与预期相符。现在我正试图让这个项目使用sbt 0.13.7(目前它使用0.13.5),当我启动activator时,我总是会遇到这样的错误(
Test
是我项目的根):


那么问题出在哪里呢?定义子项目的方法是否已更改?我已经查看了从0.13.5到0.13.7的数据,但找不到与此相关的任何内容…

实际上,sbt 0.13.5和0.13.6之间似乎发生了一些变化。在我的示例项目中,我在main
build.sbt
中定义了所有子项目,但也在subprojects文件夹中重新定义了它们

例如,在
common/build.sbt
中,子项目再次定义为

lazy val main = (project in file(".")).enablePlugins(PlayJava)
这在0.13.5中运行良好,但在0.13.5之后会中断


因此,解决方案是删除这些行,只在主
build.sbt

中定义子项目。2016年5月,这里也讨论了这个问题:评论中的答案基本上也是sbt不希望您在多项目构建的子项目中有build.sbt文件。

只是检查一下,但是您已经运行了
clean
对吗?是的,我运行了(将sbt设置为0.13.5->clean->将sbt设置为0.13.7)。问题出在sbt端(我甚至无法加载项目,因此无法运行
更新
编译
,等等)。同样,这只发生在子项目设置中,我也有同样的问题,它对我有效。非常感谢。
[info] Done updating.
java.lang.RuntimeException: No project 'common' in 'file:/home/user/Desktop/Test/'.
Valid project IDs: main
    at scala.sys.package$.error(package.scala:27)
    // OMITTED
    at xsbt.boot.Boot.main(Boot.scala)
[error] No project 'common' in 'file:/home/user/Desktop/Test/'.
[error] Valid project IDs: main
[error] Use 'last' for the full log.
lazy val main = (project in file(".")).enablePlugins(PlayJava)