Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the correct way to install a grails plugin from a zip file?

Tags:

plugins

grails

In recent versions of Grails install-plugin command has been deprecated. What is now the recommended way of installing a plugin that is not available via some repository. Assume the plugin is only available locally as zip file, e.g. after running grails package-plugin?

like image 616
Stefan Armbruster Avatar asked Apr 01 '13 20:04

Stefan Armbruster


People also ask

Where are Grails plugins stored?

By default the plugins are in . grails/<version>/<project>/plugins . You can change it by setting grails. project.

What is a Grails plugin?

Grails plugin which allows you to view files stored on the file system.


1 Answers

I think the easiest approach is to place the zip file in the project's lib folder and then add an entry in the BuildConfig.groovy. For example:

1. 'grails-image-tools-1.0.5.zip' placed in lib.
2. runtime ":grails-image-tools:1.0.5" added to BuildConfig.groovy

Since the dependency manager looks inside the project's lib folder as well, I don't have to worry about setting any paths etc.

EDIT: The latest Grails version that I worked on was 2.1.1. I'm unable to check but according to @Saurabh's comment below this isn't applicable for Grails 2.4.3

EDIT2: But @Jay says that it works with 2.4.5

like image 102
uchamp Avatar answered Oct 15 '22 05:10

uchamp