I have the following setup within my project…
- A multi project gradle build for a SOA style project, wired together using rabbitmq and spring integration. - Contains a number of grails projects as well as plain java / groovy projects to represent the services. - Alongside each of the service projects are a project (jar) containing all of the public interfaces (and messages) for the service that can be proxied using spring integration. - The projects are related to each other using gradle dependencies and then I generate IntelliJ projects files using the gradle idea plugin.
What I want to do is:
- Include the interfaces jar in the grails project so that I can use spring integration there to proxy my calls into the services via rabbitmq. - When I run the grails app have this intefaces jar built and included within grails. - When I run the grails app from IntelliJ have it compile the latest version of the interfaces and include them in the grails project. - When I build the entire project from gradle, have gradle correctly associate the interfaces jar with the grails app. - Ideally I would love to be able to do this just using dependency declaration within gradle, but this is probably a pipe dream…
What are my options?
- Add a task into the grails build lifecycle within gradle to build any dependant jars and copy them into the grails lib folder? 2. Hook into the grails build lifecycle by using Events.groovy or similar to call out to grails to build and package the dependant jars. This would cover both the IntelliJ and command line routes. 3. Build the interfaces as a grails plugin? I had discounted this as they also need to be used from non-grails projects.
Any help / advice would be appreciated.