Last updated by
4 years ago
Page: Creating Plugins, Version:2
Creating, Distributing & Installing
Creating a Plugin
You can create a Grails plugin by running the command:grails create-plugin [PLUGIN NAME]
class ExampleGrailsPlugin {
def version = 0.1 …
}- 'title' - short one-sentence description of your plugin
- 'author' - plugin author's name
- 'authorEmail' - plugin author's contact e-mail
- 'description' - full multi-line description of plugin's features
- 'documentation' - URL where plugin's documentation can be found
class QuartzGrailsPlugin {
def version = "0.1"
def author = "Sergey Nebolsin"
def authorEmail = "nebolsin@gmail.com"
def title = "This plugin adds Quartz job scheduling features to Grails application."
def description = '''
Quartz plugin allows your Grails application to schedule jobs to be
executed using a specified interval or cron expression. The underlying
system uses the Quartz Enterprise Job Scheduler configured via Spring,
but is made simpler by the coding by convention paradigm.
'''
def documentation = "http://grails.org/Quartz+plugin" …
}Installing & Distributing Plugins
To distribute the example plugin you need to navigate to its root directory using cd example and then type:grails package-plugingrails install-plugin /path/to/plugin/grails-example-0.1.zip
grails install-plugin http://myserver.com/plugins/grails-example-0.1.zip
Distributing Plugins in Grails Plugins Repository
The preferred way to distribute a plugin is to publish it under the Grails Plugins Repository. This will make your plugin available via the 'grails list-plugins' command and make the plugin's info available via 'grails plugin-info <plugin_name>'.Before you can start releasing plugins to the main repository, you first need an account. Sign up here if you have not already done so, then register to become a member of the Grails Plugins project - you should see an "Apply to join as a developer" link at the bottom of the left navigation bar. Finally, e-mail the developer mailing list to ask for your request to be processed.Once you have a Xircles account and become a member of the Grails Plugins project, have your codehaus SVN login credentials available and run:grails release-plugin
This feature (installing plugins from http://plugins.grails.org/) is available since 0.5.5. To make your plugin available for users of older versions, put the plugin's distribution zip in http://plugins.grails.org/dist/ (can be accessed via WebDAV using Codehaus Xircles username/password)Next: Understanding Plugins