mandy
mandy

Reputation: 41

install plugins manually?

is it possible to install and uninstall plugins manually in grails?? if yes, how can it be done?

Upvotes: 4

Views: 12063

Answers (4)

Stefan Armbruster
Stefan Armbruster

Reputation: 39905

For Grails 2.x, that's what the

grails install-plugin <plugin>

and

grails uninstall-plugin <plugin>

commands are for. See the command line reference at http://www.grails.org/doc/latest/.

Upvotes: 3

Aja
Aja

Reputation: 29

(Grails 2.2.4) To add a plugin that exists for example in your grails-project-dir\lib\the-grails-plugin-0.1.zip directory. Edit your grails-project-dir\grails-app\BuildConfig.groovy to include the following

plugins {
  // ....
  compile "lib:the-grails-plugin:0.1"
}

This will update your ivy-cache with folder called lib\the-grails-plugin
e.g: [user-home]\.grails\ivy-cache\lib\the-grails-plugin

Upvotes: 3

Elias Dorneles
Elias Dorneles

Reputation: 23796

Well, I know this is an old question, but it's probably a good idea to say here that since Grails 2.0, the best way to install a plugin is to update BuildConfig.groovy, adding it in the plugins section:

    plugins {
        // ....
        compile ":console:1.2"
    }

The scripts for installing/uninstalling plugins are deprecated and will likely be removed because they have issues regarding scopes and transitive dependencies.

If you want to install a plugin that is not in the central repositories, you can install the plugin in your Maven cache with grails install and then you'll be able to use it in your applications the same way.

Upvotes: 0

leebutts
leebutts

Reputation: 4882

If the commands are failing for some reason, you can remove them by:

  1. delete the entry for the plugin from application.properties
  2. delete the plugin folder from ~/.grails/grails version/projects/project name/plugins

Upvotes: 6

Related Questions