User Tools

Site Tools


Writing /app/www/public/data/meta/development/grails/deployplugin.meta failed
development:grails:deployplugin

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
development:grails:deployplugin [2016/09/27 14:01] 1carew1development:grails:deployplugin [2021/06/25 10:09] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Deploying a Grails Plugin to Artifactory ======
 +
 +In this example we will use errigal-geo-utils.
 +
 +===== Repository Declaration and Authentication =====
 +
 +You will need to declare credentials of the repository in the Build Config.
 +This should look like:
 +
 +<code>
 +  credentials {
 +    realm = "Artifactory Realm"
 +    host = "errigalArtifactory"
 +    username = "developer"
 +    password = "{XXXXX}XXXXXXXXXXXX"
 +  }
 +
 +</code>
 +
 +The Repo declarations are declared in the BuildConfig of the project within the grails.project.dependency.distribution closure.
 +
 +They are usually in the following format :
 +
 +<code>
 +
 +  remoteRepository(id: "nameOfTheRepo", url: "http://IP:PORT/applicationNAme/pluginsDirectory/") {
 +    authentication username: "whateverTheUserNameIs", password: "{XXXXX}XXXXXXXXXXXXXXXXXXXXXXX"
 +  } 
 +</code>
 +
 +nameOfTheRepo is used when deploying the plugin.
 +
 +----
 +
 +===== How to =====
 +
 +Once you are finished with your changes to the plugin find the PluginNameGrailsPlugin.groovy file in the plugin project in this case the file is called ErrigalGeoUtilsGrailsPlugin.groovy.
 +
 +In this file there should be a variable called version, increment this version and save.
 +
 +{{:development:grails:grailspluginversion.png|}}
 +
 +Once saved open the Run Grails Command menu (CMD+ALT+G on Mac) and run the following command : maven-deploy --repository=errigalPlugins
 +
 +**Note that errigalPlugins is definited in the BuildConfig and points to the Artifactory. So if errigalPlugins is renamed in the BuildConfig it will need to be renamed in the maven-deploy command.**
 +
 +{{:development:grails:mavendeploycommand.png|}}
 +
 +This will deploy the plugin to the Artifactory.
 +
 +----
 +
 +===== Update Projects that use the Plugin =====
 +
 +In the BuildConfig.groovy of the project that uses the plugin change the version of the plugin to the new version and apply the Grails changes. This will load in the updated Plugin.
 +
 +