scala - Play! 2.2 Subproject Split Routing -


i'm working on splitting scala/play! 2.2 project modules. route splitting failing compile, actual source code seem compile. here's code think relevant problem:

/build.sbt:

import play.project._  name := "edshare_play"  common.settings  playscalasettings  librarydependencies ++= common.librarydependencies  routesimport += "_root_.utils.binders._"  resolvers ++= common.resolvers  scalacoptions ++= common.scalacoptions  keys.fork in test := false  lazy val root = project.in(file("."))                        .aggregate(core, edmoderator)  lazy val edmoderator = project.in(file("modules/edmoderator"))                               .dependson(core)  lazy val core = project.in(file("modules/core")) 

/conf/routes:

# moderation api ->  /api/edmoderation               edmoderator.routes  # core api ->  /api                            core.routes 

/modules/edmoderator/conf/edmoderator.routes:

get     /:entity               controllers.edmoderator.moderation.getunmoderated(entity) put     /:entity/:id           controllers.edmoderator.moderation.moderatedocument(entity, id) 

/modules/core/conf/core.routes:

get     /entity/:entity                     controllers.entity.list(entity) 

the compiler outputs this:

[error] /users/user/dev/project/play/conf/routes:6: not found: value edmoderator [error] ->  /api/edmoderation               edmoderator.routes [error] /users/user/dev/project/play/conf/routes:9: not found: value core [error] ->  /api                            core.routes [error] /users/user/dev/project/play/conf/routes: not found: value edmoderator [error] /users/user/dev/project/play/conf/routes:9: not found: value edmoderator [error] ->  /api                            core.routes [error] /users/user/dev/project/play/conf/routes:6: not found: value handler [error] ->  /api/edmoderation               edmoderator.routes [error] /users/user/dev/project/play/conf/routes:9: not found: value handler [error] ->  /api                            core.routes [error] 6 errors found 

i figure there simple mistake i'm making somewhere, i'm unable find it. in advance pointers.

i believe missing following in config:

lazy val root = project.in(file("."))                         .aggregate(core, edmoderator)                         .dependson(core, edmoderator) 

instead of just:

lazy val root = project.in(file("."))                        .aggregate(core, edmoderator) 

you can @ sample here:

https://github.com/cnicodeme/play2.2-subproject


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -