« Return to Thread: Project structure with multiple modules
Hi all,
Currently, I'm developing a small application with Grails and Eclipse
RCP. Communication should go through hessian or burlap.
Currently, the project-server and project-domain are together in one
module, so my current directory structure looks like
this:
project-client
project-services
project-server
The plan is to split this into multiple modules, like we do when
developing something with Maven. The plan is to split it into the following
modules:
project-client (RCP client, dependency on services and
domain)
project-domain (Groovy domain model, no
dependencies)
project-services (Java service interfaces, dependency on
domain)
project-server (The grails app, with dependencies on services and
domain).
Now, I have a hard time figuring out how to do this. I'm even
wondering if this is the right approach. If it would have been a plain
Java application, I would surely go for this approach, and maybe even split the
server into an services-impl part. But I'm using Grails, and I find that some
things are different. Some of the problems I face are related to the Grails
Domain Objects, which I want to share between all the projects. I don't think
it's a good idea to have two (or more) domain models which all represent the
same domain.
So I have a couple of questions:
- Is it possible to put the domain model into a different project,
and have Grails depend on it (like Maven), while still maintaining the
hot-reload support Grails provides?
- Or, if the above is not possible: is it possible to export the
domain? I've created a small script now which does exactly that: compile all the
groovy files, put them in a jar, and even call Maven (with a Java
ProcessBuilder, I don't know if there's a better
way..).
The current approach is: compile domain, install into maven
repository, compile the services (which have a dependency on the groovy domain),
and after that, build the war, which have a dependency on the services, because
the Grails remoting plugin needs a Service to implement an
interface.
So, I hope I made my problem a bit clear, but I can imagine it's a
bit complicated by the way I tell it. So, if you need more information, please
let me know, but I'm really curious how you would solve, or have solved, a thing
like this!
Thanks in advance,
Erik
« Return to Thread: Project structure with multiple modules
| Free Forum Powered by Nabble | Forum Help |