如何从zip安装Grails 2.4.4插件? [英] How to install Grails 2.4.4 plugin from zip?

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

问题描述

我需要2.4.4中的grails-spring-security-ldap插件。然而,最新的Maven发布的插件不适用于2.4.X,但已提交到git repo(





我已经下载了代码并成功打包了一个zip文件。我还读到,您不能再在项目/ lib目录中放置压缩文件,并希望在将其添加到BuildConfig.groovy后找到它。所以,我安装到我的本地m2目录中:

  grails maven-install ./grails-spring-security-ldap-2.0 -SNAPSHOT.zip 

然后我添加了'compile':grails-spring-security-ldap:2.0- SNAPSHOT'BuildConfig.groovy。但是,它仍然试图在grails回购中找到它(见下面的错误),并且不会在本地查找。

 解决错误获取依赖关系:无法找到工件org.grails.plugins:grails-spring-security -ldap:zip:2.0-SNAPSHOT在grailsCentral(https://repo.grails.org/grails/plugins)(使用--stacktrace查看完整跟踪)
错误|
解决获取依赖关系的错误:无法找到工件org.grails.plugins:grails-spring-security-ldap:zip:2.0-SNAPSHOT在grailsCentral(https://repo.grails.org/grails/plugins)(使用--stacktrace查看完整跟踪)
错误|
解决获取依赖关系的错误:无法找到工件org.grails.plugins:grails-spring-security-ldap:zip:2.0-SNAPSHOT在grailsCentral(https://repo.grails.org/grails/plugins)(使用--stacktrace查看完整跟踪)
错误|
无法找到工件org.grails.plugins:grails-spring-security-ldap:zip:2.0-SNAPSHOT在grailsCentral(https://repo.grails.org/grails/plugins)
| Run 'grails dependency-report'获取更多信息。


从Grails 2.3开始,不再可能安装插件直接来自
文件系统。



如果您想使用本地插件,请在插件目录中运行'maven-install'以将插件安装到您的本地Maven缓存。然后,在应用程序的grails-app / conf / BuildConfig.groovy文件中声明依赖关系,它将从您的Maven缓存中解析。



如果您对插件进行了更改,只需再次在插件项目的目录中运行maven-install,并且更改将被应用程序拾取


I have a need for the grails-spring-security-ldap plugin in 2.4.4. However, the latest maven-published plugin doesn't work with 2.4.X, but commits have been made to the git repo (https://github.com/grails-plugins/grails-spring-security-ldap) to make it work.

I've downloaded the code and successfully packaged it a zip file. I've also read that you can no longer drop zips in the the project/lib directory and expect it to be found after adding it to BuildConfig.groovy. So, I installed to my local m2 directory with:

grails maven-install ./grails-spring-security-ldap-2.0-SNAPSHOT.zip

I then added 'compile ":grails-spring-security-ldap:2.0-SNAPSHOT"' to BuildConfig.groovy. However, it still tries to find it in the grails repo (see below error) and won't look locally. What am I doing wrong?

Resolve error obtaining dependencies: Could not find artifact org.grails.plugins:grails-spring-security-ldap:zip:2.0-SNAPSHOT in grailsCentral (https://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
Error |
Resolve error obtaining dependencies: Could not find artifact org.grails.plugins:grails-spring-security-ldap:zip:2.0-SNAPSHOT in grailsCentral (https://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
Error |
Resolve error obtaining dependencies: Could not find artifact org.grails.plugins:grails-spring-security-ldap:zip:2.0-SNAPSHOT in grailsCentral (https://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
Error |
Could not find artifact org.grails.plugins:grails-spring-security-ldap:zip:2.0-SNAPSHOT in grailsCentral (https://repo.grails.org/grails/plugins)
|Run 'grails dependency-report' for further information.

解决方案

Since Grails 2.3, it is no longer possible to install plugins directly from the file system.

If you wish to use local plugins then run 'maven-install' in the plugin directory to install the plugin into your local Maven cache.

Then inside your application's grails-app/conf/BuildConfig.groovy file declare the dependency and it will be resolved from your Maven cache.

If you make a change to the plugin simply run 'maven-install' in the directory of the plugin project again and the change will be picked up by the application

这篇关于如何从zip安装Grails 2.4.4插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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