插件的正确方法是什么

插件的正确方法是什么

本文介绍了从 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?

推荐答案

我认为最简单的方法是将 zip 文件放在项目的 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

但是@Jay 说它适用于 2.4.5

But @Jay says that it works with 2.4.5

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

07-29 20:27