1
votes

I have a multi-module Play 2.4 setup with a 'commons' and a 'domain' module, both contain entities that need to be transformed to Q*s. But I can't figure out the sbt setup to make it work, no files will be generated..

I can get this working with ONE model package in the root project like described in the README of play-querydsl sbt plugin (version 0.1.2). But my entities are located in the submodules (e.g. ./modules/domain/src/main/java/net/.../domain/Entity.java

So here is my root config, the build.sbt of the modules just contain a name := "..."

lazy val commons = (project in file("modules/commons"))
.settings(commonSettings: _*)
.settings(queryDSLPackage :="net/twentyfourseven/commons/domain/jpa")
.enablePlugins(QueryDSLPlugin)

lazy val domain = (project in file("modules/domain"))
.settings(commonSettings: _*)
.settings(queryDSLPackage :="net/twentyfourseven/registration/domain")
.dependsOn(commons)
.enablePlugins(QueryDSLPlugin)

lazy val root = (project in file("."))
.settings(commonSettings: _*)
.dependsOn(commons, domain)
.aggregate(commons, domain)
.enablePlugins(PlayJava, QueryDSLPlugin)

I have to say that I'm new to sbt, scala, play, so maybe it's just a stupid configuration mistake.

Thanks in advance!

1

1 Answers

0
votes

I got a similar problem that "projects" command didn't list my sub projects configured in the build.sbt of the root project under play framework 2.4.2.

sub-projects configuration in build.sbt:

lazy val root = (project in file(".")).enablePlugins(PlayScala)
lazy val vltCommon = (project in file("./vlt-common")).enablePlugins(PlayScala)
lazy val vltModels = (project in file("./vlt-models")).enablePlugins(PlayScala)