Skip to content

Commit

Permalink
Remove redundant content on plugin publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
Graeme Rocher authored and Graeme Rocher committed Feb 5, 2015
1 parent bee5fa3 commit 556c511
Showing 1 changed file with 1 addition and 73 deletions.
74 changes: 1 addition & 73 deletions src/en/guide/plugins/repositories.gdoc
Expand Up @@ -15,77 +15,5 @@ grails plugin-info [plugin-name]
which prints extra information about it, such as its description, who wrote, etc.

{note}
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|http://grails.org/Creating+Plugins].
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 the [plugin portal|http://grails.org/plugins] website.
{note}

When you have access to the Grails Plugin repository, install the [Release Plugin|http://grails-plugins.github.com/grails-release/docs/index.html] by declaring it as a 'build' scoped dependency in @grails-app/conf/BuildConfig.groovy@ file:

{code:java}
grails.project.dependency.resolution = {
...
plugins {
build ':release:3.0.0'
}
}

{code}

And execute the @publish-plugin@ command to release your plugin:

{code:java}
grails publish-plugin
{code}


This will automatically publish the plugin to the central repository. If the command is successful, it will immediately be available on the plugin portal at http://grails.org/plugin/<pluginName>. You can find out more about the Release plugin and its other features in [its user guide|http://grails-plugins.github.com/grails-release/docs/index.html].

h4. 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|http://grails.org/doc/1.2.x/guide/12.%20Plug-ins.html#12.2%20Plugin%20Repositories] 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|guide:dependencyResolution]. For example you can define a remote Maven repository that contains Grails plugins using the following syntax in @grails-app/conf/BuildConfig.groovy@:

{code}
repositories {
mavenRepo "http://repository.codehaus.org"

// ...or with a name
mavenRepo name: "myRepo",
root: "http://myserver:8081/artifactory/plugins-snapshots-local"
}
{code}

You can also define a SVN-based Grails repository (such as the one hosted at [http://plugins.grails.org|http://plugins.grails.org/]) using the @grailsRepo@ method:

{code}
repositories {
grailsRepo "http://myserver/mygrailsrepo"

// ...or with a name
grailsRepo "http://myserver/svn/grails-plugins", "mySvnRepo"
}
{code}

There is a shortcut to setup the Grails central repository:

{code}
repositories {
grailsCentral()
}
{code}

The order in which plugins are resolved is based on the ordering of the repositories. So in this case the Grails central repository will be searched last:

{code}
repositories {
grailsRepo "http://myserver/mygrailsrepo"
grailsCentral()
}
{code}


h4. Publishing to Maven Compatible Repositories

In general it is recommended for Grails 1.3 and above to use standard Maven-style repositories to self host plugins. The benefits of doing so include the ability for existing tooling and repository managers to interpret the structure of a Maven repository.

You use the Release plugin to publish a plugin to a Maven repository. Please refer to the section of the [Maven deployment|guide:mavendeploy] user guide on the subject.

0 comments on commit 556c511

Please sign in to comment.