15.2 Plugin Repositories - Reference Documentation
Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith, Lari Hotari
Version: 2.3.8
15.2 Plugin Repositories
Distributing Plugins in the Grails Central Plugin Repository
The preferred way to distribute plugin is to publish to the official Grails Central Plugin Repository. This will make your plugin visible to the list-plugins command:grails list-plugins
grails plugin-info [plugin-name]
If you have created a Grails plugin and want it to be hosted in the central repository, you'll find instructions for getting an account on this wiki page.When you have access to the Grails Plugin repository, install the Release Plugin by declaring it as a 'build' scoped dependency in
grails-app/conf/BuildConfig.groovy
file:grails.project.dependency.resolution = { … plugins { build ':release:3.0.0' } }
publish-plugin
command to release your plugin:grails publish-plugin
Configuring Additional Repositories
The process for configuring repositories in Grails differs between versions. For version of Grails 1.2 and earlier please refer to the Grails 1.2 documentation on the subject. The following sections cover Grails 1.3 and above.Grails 1.3 and above use Ivy under the hood to resolve plugin dependencies. The mechanism for defining additional plugin repositories is largely the same as defining repositories for JAR dependencies. For example you can define a remote Maven repository that contains Grails plugins using the following syntax ingrails-app/conf/BuildConfig.groovy
:repositories { mavenRepo "http://repository.codehaus.org" // ...or with a name mavenRepo name: "myRepo", root: "http://myserver:8081/artifactory/plugins-snapshots-local" }
grailsRepo
method:repositories { grailsRepo "http://myserver/mygrailsrepo" // ...or with a name grailsRepo "http://myserver/svn/grails-plugins", "mySvnRepo" }
repositories { grailsCentral() }
repositories {
grailsRepo "http://myserver/mygrailsrepo"
grailsCentral()
}