Grails: is it possible to exclude a plugin dependency of another plugin?

試著忘記壹切 提交于 2019-12-29 08:44:11

问题


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.


回答1:


Use as

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


来源:https://stackoverflow.com/questions/18924347/grails-is-it-possible-to-exclude-a-plugin-dependency-of-another-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!