How to eliminate global grails dependency

Grails has a bouncycastle: bcprov-jdk14: 138 as a 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 application needs bcprov-jdk15on-149. When I added it as a dependency, it did not supplant the old version

 dependencies { build 'org.bouncycastle:bcpg-jdk15on:1.49' build 'org.bouncycastle:bcprov-jdk15on:1.49' } 

I tried many options to rule it out, 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 make it work is to eliminate the dependency of the whole 'grail-docs'.

How to exclude only the old bcprov-jdk14: 138?

Or how to do it so that the new (bcprov-jdk15on-149) evict the old (bcprov-jdk14: 138)?

+7
dependencies grails
source share
1 answer

The error message seems to be → 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 helps you.

+9
source share

All Articles