Last updated by 1 year ago

Page: Creating Plugins, Version:25

Publishing Plugins

Imagine you have created a new plugin as described in the user guide and that you now want to make it publicly available so that any Grails developer can use it. The process for making this wish a reality is straightforward:

  1. Register on this site if you haven't already done so
  2. Fill out this form with the details of your plugin.
You will be emailed a response with whether you can publish the plugin or not. If for any reason you're rejected, an explanation will be given. Note that it's unlikely that permission will be granted unless the plugin has the appropriate information in the plugin descriptor and at least some effective documentation for getting started.

If your application is successful, then you can publish your plugin right away. For newer versions of Grails the Release plugin will be installed already (it is referenced in BuildConfig.groovy in the plugins section). Be sure to use the most recent version of the plugin, for example

build(':release:2.0.4', ':rest-client-builder:1.0.2') {
   export = false
}

It's important that you use version 2.0 or higher of the Release plugin and Grails 2.0 or higher so the POMs are generated correctly. You can still target pre-2.0 applications with the grailsVersion attribute in the plugin descriptor, but Grails 2 must be used to develop and release the plugin.

Execute the publish-plugin command:

grails publish-plugin --no-scm

You will be asked for your grails.org credentials (for the repository and the plugin portal) and then your plugin will be published. If that completes successfully, a plugin will be added to the portal automatically at /plugin/<name>. Review it to check everything is OK.

At the end of this process, your plugin will appear in the output of the list-plugins command as well as in the plugin portal. And of course users will be able to install the plugin either via a dependency declaration in grails-app/conf/BuildConfig.groovy or via the install-plugin command.

We do recommend that you check out the full Release plugin user guide, because there are many options available to you, including a mechanism to put your grails.org credentials in the ~/.grails/settings.groovy file (so you don't have to enter them every time you publish a plugin).

Next: Understanding Plugins