Jan 12th, 2012, 03:26 AM
Can Grails apps depend on other Grails apps, the way Java apps do?
I'm trying to develop a reusable, Grails "utility" server application that can be used by developers of multiple other Grails applications in a manner like how Java apps can depend on other Java apps.
Ideally, I'd like to keep the reusable "utility" server's code base separate from the application code that depends on it, while allowing developers to access and extend this reusable "utility" server's code (controllers, domain objects, services, and plug-ins, etc.) from and within their own Grails applications.
My current environment is:
- Grails 2.0.0
- SpringSource Tool Suite 2.9.0.M1
- VMware vFabric tc Server Developer Edition v2.6
I've tried adding the reusable "utility" Grails application as "Required on the java build path" of another Grails application. This resulted in both applications being deployed and run side-by-side in the tc servlet container, but the dependent application was unaware of the controllers provided by the "utility" application.
Next, I tried adding the grails-app/controllers and then grails-app/controllers/utility directory of the "utility" application as a "Linked source folder" on the java build path, but when the dependent application was run in the tc server the result was the same.
What I'd like to be able to do is:
- keep the "utility" server's code base separate from the application code that depends on it
- allow developers to access and extend the "utility" code from and within their own Grails apps
- build both Grails apps into a single war file, or, if two war files are necessary, ...
- provide compile and run-time linkage/coupling/integration of the "utility" and dependent applications
Is this, or something like it, possible with Grails?
Is there documentation, examples, or tutorials showing how to do this with Grails?
Jan 23rd, 2012, 07:36 PM
You can see a reply to this thread in the STS Forum here.
Tags for this Thread