Last updated by lhotari 10 months ago

Publishing Plugins

If you have created a new plugin as described in the user guide and you now want to make it publicly available so that any Grails developer can use it. This guide describes how to make your plugin available to Grails users.

Publishing Grails 3 Plugins

The Grails 3 plugin portal is hosted on Bintray. See this excellent tutorial on how to publish your plugin to Bintray. Once your plugin is published click the "Include My Package" link on plugin portal to request inclusion.

Publishing Grails 2 Plugins

  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.2.1', ':rest-client-builder:1.0.3', {
   export = false

or for Grails 2.3+

build ':release:3.1.1', ':rest-client-builder:2.1.1', {
   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 --stacktrace

You will be asked for your 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 credentials in the ~/.grails/settings.groovy file (so you don't have to enter them every time you publish a plugin).

Next: Understanding Plugins