问题
I have project in PlayFramework. It has one main project without any code/logic. And it have few submodules:
- main:
- admin
- common
- shop
Modules: admin and shop will base on common module (classes like: user, role, permission), so I have to configure it that way:
lazy val shop = project.in(file("modules/shop"))
.dependsOn(cirs)
.dependsOn(common)
.dependsOn(admin)
lazy val admin = project.in(file("modules/admin"))
.dependsOn(cirs)
.dependsOn(common)
.dependsOn(shop)
But in module common I have view where I wonna display links (a href...) to other submodules. To do this I have to use reverse routing classes, wich are controllers in submodules: shop and admin. So I have to use something like that:
<a href="@controllers.shop.routes.Index.index">shop</a>
<a href="@controllers.admin.routes.Index.index">admin</a>
Wich mean that I have to also add .dependsOn(shop).dependsOn(admin) for common module.
But it cause a Cyclic dependencies, wich is incorrect!
Please help me. How can I deal with it?
来源:https://stackoverflow.com/questions/25931754/build-sbt-defining-project-dependency-between-modules