如何使用grails.plugin.location? [英] How to use grails.plugin.location?

查看:152
本文介绍了如何使用grails.plugin.location?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个插件项目,我创建为 grails create-plugin myPlugin 。我还创建了一个'普通'grails项目,如 grails create-app myPluginDemo 。我试图在 myPluginDemo 中安装 myPlugin 插件,但不知道如何使用 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.

我在哪里放置 grails.plugin.location 内部 BuildConfig.groovy ?在插件中部分?在存储库里面部分?

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

我应该追加到 grails.plugin.location code>?它应该是 grails.plugin.location.myPlugin ?或 grails.plugin.location.grails-my-plugin ?还有其他什么?

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

推荐答案

grails.plugin.location 不是依赖关系分辨率,所以它会在之外> grails.project.dependency.resolution

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

它应该如下所示, myPluginDemo myPlugin 位于相同的目录中。而且,这不会将插件安装到应用程序中,但是应用程序将引用在开发模式中方便的插件的文件系统。为了使用打包的插件,必须在> grails.project.dependency.resolution 中的插件 p>

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 {

    }
}

这篇关于如何使用grails.plugin.location?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆