Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use grails.plugin.location?

I have a plugin project which I created as grails create-plugin myPlugin. I also created a 'normal' grails project as grails create-app myPluginDemo. I'm trying to install myPlugin plugin in myPluginDemo but don't understand how to use grails.plugin.location.

Where do I put grails.plugin.location inside BuildConfig.groovy? Inside plugins section? Inside repositories section?

What should I append to grails.plugin.location? Should it be grails.plugin.location.myPlugin? Or grails.plugin.location.grails-my-plugin? Something else?

like image 893
zoran119 Avatar asked Apr 20 '13 01:04

zoran119


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.

How do I add Grails plugins to IntelliJ?

Support for the Grails framework is not bundled with IntelliJ IDEA. You can install the Grails plugin from the JetBrains repository as described in Install plugins. The latest compatible version of IntelliJ IDEA is 2021.3. You can find the documentation for Grails support in earlier versions of IntelliJ IDEA Help.

What is a Grails plugin?

Grails is first and foremost a web application framework, but it is also a platform. By exposing a number of extension points that let you extend anything from the command line interface to the runtime configuration engine, Grails can be customised to suit almost any needs.


Video Answer


1 Answers

grails.plugin.location is not a dependency resolution, so it goes outside grails.project.dependency.resolution.

It should be like below, if both myPluginDemo and myPlugin are in the same directory. Moreover, this will not install the plugin into the app, but the application will refer to the file system for the plugin which is convenient in development mode. In order to use the packaged plugin it has to be referred in plugins inside grails.project.dependency.resolution

grails.plugin.location.myPlugin = "../myPlugin"
grails.project.dependency.resolution = {
    repositories {

    }
    dependencies {

    }
    plugins {

    }
}
like image 159
dmahapatro Avatar answered Oct 03 '22 09:10

dmahapatro