I've been looking at using grails to build a mock server framework, but have been having troubles configuring it within STS.
The basic requirement is to have a core framework living in its own project, which will ultimately end up as a WAR artifact, and then for each service that's mocked a new jar project will be created containing the service configuration (typically xml/json responses and groovy files for dynamic responses), which will get pulled into the main WAR file as a dependency (using a profile during the build process).
This external build process is fairly well defined using Maven and profiles. I've prototyped this and it all hangs together running off a builder such as Jenkins.
What I'm having trouble with is setting up a usable eclipse environment using the native eclipse project dependency management and eclipse grails support. What I'd like to have is a standard grails project containing the framework, and then a standard groovy project containing the service configuration files and then add the latter project as a dependency to the former. What I've found however, is that if you do this and then invoke run-app, the classes and resources in the groovy project don't get included in the running application. I've tried checking export, but this doesn't make any difference.
The only workaround I've found so far, is to make the groovy project maven artifact a dependency within the grails application, and to pull this in on each build. This involves the undesirable step of packaging and installing the groovy project into the local repo each time a change is made in that project. The other major drawback to this approach of course is that I don't benefit at all from dynamic updates, and any code changes in the groovy project require a restart of the grails app.
Has anyone successfully configured eclipse in this way? If this isn't possible, is there some way of tinkering with the grails build process in order to include the other project through relative paths, say?