问题描述
Grails有bouncycastle:bcprov-jdk14:138作为全局依赖关系
+ --- org.grails:grails-docs :2.3.3
| \ --- org.xhtmlrenderer:core-renderer:R8
| \ --- org.yaml:snakeyaml:1.8
| \ --- org.grails:grails-gdoc-engine:1.0.1
| \ --- com.lowagie:itext:2.0.8
| \ --- bouncycastle:bcmail-jdk14:138
| \ --- bouncycastle:bcprov-jdk14:138
| \ --- commons-lang:commons-lang:2.6
但是我的应用需要bcprov-jdk15on -149。当我将它添加为依赖关系时,它不会删除旧版本
依赖关系{
build'org.bouncycastle:bcpg -jdk15on:1.49'
build'org.bouncycastle:bcprov-jdk15on:1.49'
}
我尝试了很多变体来排除它,但没有人工作
inherits(global){
// excludes'grails-docs'
excludes'org.bouncycastle:bcmail-jdk14:138'
excludes'bouncycastle:bcmail-jdk14:138'
不包括'bcmail-jdk14-138.jar'
excludedes'bcmail-jdk14'
excludes'bcmail'
excludes'bouncycastle:bcprov-jdk14:jar:138'
不包括'org.bouncycastle:bcprov-jdk14:138'
excludes'bouncycastle:bcprov-jdk14:138'
excludes'bcprov-jdk14-138.jar'
excludes'bcprov-jdk14 '
excludees'bcprov'
excludes'bouncycastle'
}
Ť他只能让它工作 - 排除整个'grail-docs'依赖。
如何排除旧的bcprov-jdk14:138? / b>
或者如何做到这一点(bcprov-jdk15on-149)逐出(bcprov-jdk14:138)?
似乎是一个报告的错误>>
我发现了解决方法,覆盖 com.logwagie.itext
依赖。
依赖关系{
//添加这行
build(com.lowagie:itext:2.1.7){excludesbouncycastle:bcprov-jdk14:138,org.bouncycastle:bcprov-jdk14:1.38}
}
希望这将有助于您。
Grails has bouncycastle:bcprov-jdk14:138 as global dependency
+--- org.grails:grails-docs:2.3.3
| \--- org.xhtmlrenderer:core-renderer:R8
| \--- org.yaml:snakeyaml:1.8
| \--- org.grails:grails-gdoc-engine:1.0.1
| \--- com.lowagie:itext:2.0.8
| \--- bouncycastle:bcmail-jdk14:138
| \--- bouncycastle:bcprov-jdk14:138
| \--- commons-lang:commons-lang:2.6
But my app need bcprov-jdk15on-149. When I added it as dependency it doesn't evict old version
dependencies {
build 'org.bouncycastle:bcpg-jdk15on:1.49'
build 'org.bouncycastle:bcprov-jdk15on:1.49'
}
I tried a lot of variants to exclude it but no one works
inherits("global") {
//excludes 'grails-docs'
excludes 'org.bouncycastle:bcmail-jdk14:138'
excludes 'bouncycastle:bcmail-jdk14:138'
excludes 'bcmail-jdk14-138.jar'
excludes 'bcmail-jdk14'
excludes 'bcmail'
excludes 'bouncycastle:bcprov-jdk14:jar:138'
excludes 'org.bouncycastle:bcprov-jdk14:138'
excludes 'bouncycastle:bcprov-jdk14:138'
excludes 'bcprov-jdk14-138.jar'
excludes 'bcprov-jdk14'
excludes 'bcprov'
excludes 'bouncycastle'
}
The only way to made it work – exclude whole 'grail-docs' dependency.
How exclude only old bcprov-jdk14:138?
Or how to do that the new(bcprov-jdk15on-149) evict old(bcprov-jdk14:138)?
It seems to be a reported bug >> http://jira.grails.org/browse/GRAILS-10640
I found a workaround by overriding the com.logwagie.itext
dependency.
dependencies {
// add this line
build("com.lowagie:itext:2.1.7") { excludes "bouncycastle:bcprov-jdk14:138", "org.bouncycastle:bcprov-jdk14:1.38" }
}
Hope this will help you.
这篇关于如何排除grails全局依赖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!