What is "grails-plugin"

A plugin Grails is an independent feature package that can be installed in a Grails application. When a Grails plugin is installed, it can do the following:

  • Define Spring additional Beans;
  • Modify the file web.xml generated;
  • Add new methods to application artifacts such as controllers (controllers), domain classes (Domain classes), services (services, not to be confused with webservices), etc.;
  • Provide new tag libraries (tab Libraries, tag libs);
  • Provide additional resources and classes for the application;
  • Provide new Grails commands and more.

For example, when you install the Grails plugin from jQuery

  • The archives Javascript jQuery are added to the application;
  • A new Grails tag <jq:jquery> is added to the application;
  • A new Grails command grails install-plugin jquery is added to the application.

When you install a Grails plugin, the functionality of this plugin is made available to the application. However, the plugin itself is not actually copied into the application, only the name and version of the plugin are added to the file application.properties application. The plugin itself is downloaded to $HOME/.grails and the application carries it from there.

The structure of a Grails plugin project is identical to that of a Grails application, with the exception of a configuration file (known as plugin descriptor, Descriptor plugin) that is included in the root directory of a plugin.