Sections

  1. First Steps
  2. Moving your code to another hosting provider
  3. Upgrading the Release plugin
  4. Configuration
  5. Publishing

How to migrate to the new Grails Central repository

In March 2012 Grails migrated from a custom SVN based repository for plugins, to one based on Artifactory. The benefits of doing so are as follows:

This HOWTO is for plugin developers who would like to know the steps necessary to move to the new plugin repository.

First Steps

In order to publish to the new repository you need to first submit your plugin for approval through the plugin portal. Once you have been notified of the approval, you are ready to publish.

Moving your code to another hosting provider

Since the old SVN repository will be read-only we encourage folks to move their plugins to alternative hosting providers. Github is a great option, see the details describing how to create a repo

Upgrading the Release plugin

Next you need to make sure you are using 2.0.0 or above of the Release plugin to publish plugins.

The old release-plugin command that ships with the Grails 1.x line will no longer work! You must use the new release plugin.

This can be achieved by adding the Grails central repository to your BuildConfig.groovy respositories:

grailsRepo "http://grails.org/plugins"

And then running install-plugin:

grails install-plugin release 2.0.0

or add it as a build dependency in grails-app/conf/BuildConfig.groovy:

grails.project.dependency.resolution = {
    …
    plugins {
        build ":release:2.0.0", {
            export = false
        }
        …
    }
}

Configuration

In order to publish to the central repository you need to configure your grails.org credentials in ~/.grails/settings.groovy as follows:

grails.project.repos.grailsCentral.username='YOUR USERNAME'
grails.project.repos.grailsCentral.password='YOUR PASSWORD'

Publishing

To publish a plugin simply run publish-plugin command as usual:

grails publish-plugin