开发者

install plugins manually?

is it possible to install and uninstall plugins manually in g开发者_Go百科rails?? if yes, how can it be done?


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


(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


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/.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜