9

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?

4

1 回答 1

22

grails.plugin.location不是依赖解析,所以它在外面grails.project.dependency.resolution

myPluginDemo如果两者和myPlugin都在同一个目录中,它应该如下所示。此外,这不会将插件安装到应用程序中,但应用程序会引用插件的文件系统,这在开发模式下很方便。为了使用打包的插件,它必须在plugins里面被引用grails.project.dependency.resolution

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

    }
    dependencies {

    }
    plugins {

    }
}
于 2013-04-20T03:09:52.240 回答