Is it possible or recommended to have/use Grails projects as common dependencies for other Grails projects?
Say I have grails-1 project which contain the concept of a User service (i.e. domain classes for User, SecUser, SecKey objects, exposed services (via HTTP exporter) in order to authenticate/login/logout and some pages/controllers to manage the CRUD on these domain objects for an admin user, etc).
Now say I have a grails-2 project which also has the same concept of a User service.
Both my projects at runtime at seperate from each other which different databases. So no shared runtime instance of the User service is suitable.
So I was thinking of moving all the User functionality into a common-user Grails project which is packaged as a war then grails-1 and grails-2 have a dependency on this (as they will wish to use domain classes/services in their functionality).
Then for svr-1 I deploy wars common-user and grails1, srv-2 has common-user and grails-2.
Will that work?
Or is there a way to reference common-user as a compile dependency in grails-x which in affect will package all it's objects in the grails-x war?