如何从zip安装Grails2.4.4插件?

如何从zip安装Grails2.4.4插件?,grails,grails-plugin,Grails,Grails Plugin,我需要2.4.4中的GrailsSpringSecurityLDAP插件。然而,maven发布的最新插件不适用于2.4.X,但已经提交git repo()以使其工作 我已经下载了代码并成功地将其打包为zip文件。我还读到,您不能再在project/lib目录中删除ZIP,而期望在将其添加到BuildConfig.groovy之后找到它。因此,我在本地m2目录中安装了: grails maven-install ./grails-spring-security-ldap-2.0-SNAPSHOT.

我需要2.4.4中的GrailsSpringSecurityLDAP插件。然而,maven发布的最新插件不适用于2.4.X,但已经提交git repo()以使其工作

我已经下载了代码并成功地将其打包为zip文件。我还读到,您不能再在project/lib目录中删除ZIP,而期望在将其添加到BuildConfig.groovy之后找到它。因此,我在本地m2目录中安装了:

grails maven-install ./grails-spring-security-ldap-2.0-SNAPSHOT.zip
然后,我在BuildConfig.groovy中添加了“compile”:grails-spring-security ldap:2.0-SNAPSHOT“”。然而,它仍然试图在GrailsRepo中找到它(见下面的错误),并且不会在本地查找。我做错了什么

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.

自从Grails2.3以来,不再可能直接从 文件系统

如果您希望使用本地插件,请在插件目录中运行“maven install”,将插件安装到本地maven缓存中

然后,在应用程序的grails app/conf/BuildConfig.groovy文件中声明依赖项,并从Maven缓存中解析它


如果您对插件进行了更改,只需在插件项目的目录中再次运行“maven install”,应用程序就会接受更改

只是为了安全起见:您已经克隆了repo。然后执行
grailsmaven安装
,只在本地安装它。确保.m2或.ivy目录中没有多余的内容。