Spring roo supports multi-module projects and there is some stuff in examples and documentation but it looks like it's not too flexible.
I decided to split the project in module per layer: model, repository, service, web and keep integration tests either in the service module or in a separate integration module.
Although Roo has a basic support for multi-module projects, in their examples layers are split in such a way that the service, model and repository exists in one module (core) and the mvc stuff in another module, so I didn't find an example of splitting the layers to module per layer.
The first problem I had with my approach was that I had to define the jpa setup in both modules: model (has the jpa annotations) and repository (has the jpa functionality).
The second issue which is kind of a blocker, is that I ended up having cyclic dependencies: the service & repository modules are using the model module but on the other hand, the model module has the integration tests (auto-generated) which use the service and repository modules.
Is there any way to move the integration tests out of the model module and have them either in the service module or in a separate module and do that while being Roo compatible?
By default Roo adds the integration tests in the same module where the model exists and I didn't find a way to ask Roo to put the tests somewhere else.