手动安装插件?
是否可以在grails中手动安装和卸载插件? 如果可以,该怎么办?
is it possible to install and uninstall plugins manually in grails??
if yes, how can it be done?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果命令由于某种原因失败,您可以通过以下方式删除它们:
If the commands are failing for some reason, you can remove them by:
(Grails 2.2.4) 添加一个存在于 grails-project-dir\lib\the-grails-plugin-0.1.zip 目录中的插件。编辑您的 grails-project-dir\grails-app\BuildConfig.groovy 以包含以下内容
这将使用名为 lib\the-grails-plugin 的文件夹更新您的 ivy 缓存
例如:[用户主目录]\.grails\ivy-cache\lib\the-grails-plugin
(Grails 2.2.4) To add a plugin that exists for example in your grails-project-dir\lib\the-grails-plugin-0.1.zip directory. Edit your grails-project-dir\grails-app\BuildConfig.groovy to include the following
This will update your ivy-cache with folder called lib\the-grails-plugin
e.g: [user-home]\.grails\ivy-cache\lib\the-grails-plugin
对于 Grails 2.x,这就是
和
命令的用途。请参阅命令行参考 http://www.grails.org/doc/latest/。
For Grails 2.x, that's what the
and
commands are for. See the command line reference at http://www.grails.org/doc/latest/.
嗯,我知道这是一个老问题,但在这里说一下,从 Grails 2.0 开始,安装插件的最佳方法是更新
BuildConfig.groovy
,将其添加到插件中可能是个好主意部分:用于安装/卸载插件的脚本已被弃用,并且可能会被删除,因为它们存在有关范围和传递依赖项的问题。
如果要安装不在中央存储库中的插件,可以使用
grails install
然后您就可以以相同的方式在应用程序中使用它。Well, I know this is an old question, but it's probably a good idea to say here that since Grails 2.0, the best way to install a plugin is to update
BuildConfig.groovy
, adding it in the plugins section:The scripts for installing/uninstalling plugins are deprecated and will likely be removed because they have issues regarding scopes and transitive dependencies.
If you want to install a plugin that is not in the central repositories, you can install the plugin in your Maven cache with
grails install
and then you'll be able to use it in your applications the same way.