从zip文件安装grails插件的正确方法是什么? [英] What's the correct way to install a grails plugin from a zip file?

查看:70
本文介绍了从zip文件安装grails插件的正确方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在最近的Grails版本中, install-plugin 命令已被弃用。现在推荐的方式是安装一个通过某个存储库不可用的插件。假设该插件仅作为zip文件在本地提供,例如在运行 grails package-plugin

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?

推荐答案

后,我认为最简单的方法将压缩文件放在项目的lib文件夹中,然后在BuildConfig.groovy中添加一个条目。例如:

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



因为依赖管理器也在项目的lib文件夹中查找,所以我不必担心设置任何路径等。

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

编辑:
我工作的最新Grails版本是2.1.1。我无法检查,但根据下面的@ Saurabh的评论,这不适用于Grails 2.4.3

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:
但@Jay说,它可以与2.4.5

But @Jay says that it works with 2.4.5

这篇关于从zip文件安装grails插件的正确方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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