How to use grails.plugin.location?

ε祈祈猫儿з 提交于 2019-12-28 02:56:06

问题


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?


回答1:


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 {

    }
}


来源:https://stackoverflow.com/questions/16115635/how-to-use-grails-plugin-location

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!