Grails:是否可以排除另一个插件的插件依赖关系? [英] Grails: is it possible to exclude a plugin dependency of another plugin?

查看:127
本文介绍了Grails:是否可以排除另一个插件的插件依赖关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Grails 2.2.2应用程序,并决定使用cache-ehcache插件。

问题是这个插件取决于版本1.0.0的缓存插件,我的应用程序有缓存插件版本1.0.1(我认为它是默认的grails 2.2.2)。因此,当我尝试编译应用程序时,我总是收到相同的消息:

 您目前已经安装了该插件的一个版本[缓存1.0.1。你想更新到[cache-1.0.0]吗? [y,n] 

我每次编译应用程序时都必须回答这个问题。我尝试在 .grails / 2.2.2 / my_project / plugins / cache-ehcache-1.0.0 / dependencies.groovy 中将项目插件依赖项更改为cache-1.0.1。和 plugin.xml 文件。它似乎没有工作。



我知道可以从插件依赖关系中排除jar,但可以排除另一个插件吗?



我尝试将 BuildConfig.groovy 的部分更改为:

  plugins {
...
compile(':cache-ehcache:1.0.0'){excludes:cache:1.0.0}
}

但它仍然不起作用。我每次编译应用程序都会得到同样的问题。

 插件{
...
编译(':cache-ehcache:1.0.0'){不包括cache}
}


I have a grails 2.2.2 app, and have decided to use cache-ehcache plugin.

The problem is that this plugin depends on the cache plugin with version 1.0.0 and my application has the cache plugin version 1.0.1 (i think it is the default for grails 2.2.2). Therefore when i try to compile the app i always get the same message:

You currently already have a version of the plugin installed [cache-1.0.1]. Do you want to update to [cache-1.0.0]? [y,n]

I have to answer this question every time i compile the application. I tried to change the project plugin dependency to cache-1.0.1 in .grails/2.2.2/my_project/plugins/cache-ehcache-1.0.0/dependencies.groovy and plugin.xml files. It does not seem to work.

I know that it is possible to exclude jars from plugin dependencies but is it possible to exclude another plugin?

I tried changing the section of BuildConfig.groovy to:

plugins {
    ...  
    compile(':cache-ehcache:1.0.0') { excludes ":cache:1.0.0"}
}

but it still does not seem to work. I get the same question every time i compile the app.

解决方案

Use as

plugins {
    ...  
    compile(':cache-ehcache:1.0.0') { excludes "cache"}
}

这篇关于Grails:是否可以排除另一个插件的插件依赖关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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