Creating a Grails Template Project for Reuse Later

I am creating a Grails application and I understand that a lot of custom things would be useful in other projects that I will use in my palette, and wonder what would be a reasonable way to reuse? Not only common domain classes of functionality, controllers and corresponding gsp views, but also services, tags, css files, etc.

From what I collect Weceem CMS can work as a standalone application or plugin, will this approach be the most practical? Ideally, it would be great to be able to apply / update changes in the template project to those dependent on it. Thanks in advance.

+4
source share
1 answer

I am sure there are several ways to implement this. My approach would probably be to use a reusable controller or GSP as a plugin. I would create a plug-in (which is almost identical to creating a regular grails application), and then create a local package for it, and finally, whenever I need to use, install the local plug-in in another project. The fact is that plugins do not have to come from a grails replica, it can be from a local package, for example:

grails install-plugin c:\\my\\local\\path\\grails-example-0.1.zip 
+4
source

Source: https://habr.com/ru/post/1396068/


All Articles