Can't use sbt 0.13.7 with Play subprojects

后端 未结 2 1142
独厮守ぢ
独厮守ぢ 2020-12-21 02:27

I have a sample Play 2.3.8 project that is composed by two subprojects (common and common2):

$ tree -L 2 .
.
├── build.sbt
├── common
│   ├── app
│   ├── bui         


        
相关标签:
2条回答
  • 2020-12-21 03:08

    Indeed it seems that something changed between sbt 0.13.5 and 0.13.6. In my sample project I have all the subprojects defined in the main build.sbt, but had also them redefined inside the subprojects folder.

    So in common/build.sbt for example, the subproject is defined again as

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

    This works well in 0.13.5, but breaks after that.

    So the solution was to remove those lines and only define the subprojects in the main build.sbt.

    0 讨论(0)
  • 2020-12-21 03:14

    This issue was also discussed in May 2016 here: SBT: How to define dependencies of subprojects in subprojects' build.sbt files? The answer in the comments is also basically that SBT doesn't want you to have build.sbt files in your subprojects of multiproject builds.

    0 讨论(0)
提交回复
热议问题