Firstly, in Grails, a plugin is not considered a black box. On the contrary, all code is open; if you really want to make it a black box, then you should use another plugin, Binary artifacts .
Secondly, your approach is very reasonable. To access the resources of the plugin, I would create a taglib like:
def res = { attrs -> attrs.dir=pluginContextPath //Do whatever you want here out << g.resource(attrs) }
and name it the same as <g:resource> . This way, you donโt even have to set the resource path of your plugins. The agile plugin uses this approach.
You can also take a look at the Grails Resources plugin , which tries to deal with the nightmare of static resource dependencies among Grails plugins and projects. I never used it, but Iโll probably integrate it in my next Grails project (BTW, it will be included in Grails 1.4).
fabien7474
source share