Need two different JARs in one Java application

I have a Java application that includes two third party JARs (Amazon Kinesis and MaxMind GeoIP2), each using a different version of Jackson. Neither version of Jackson works with both third party JARs.

Also, I run Apache maven JAR pluging which creates UBER uber containing all dependent classes.

Given that I cannot change the third party JARs, I am not sure how I can get each third party JAR to invoke the appropriate version of JARs from Jackson.

Any ideas?

Kinesis is expected to: com.fasterxml.jackson.dataformat

" jackson-dataformat-cbor:2.6.6

com.fasterxml.jackson.core

"jackson-databind:2.6.6

And GeoIP2 expects: com.fasterxml.jackson.core

"jackson-databind:2.8.8.1

+3


source to share


1 answer


Use Maven shade plugin

https://maven.apache.org/plugins/maven-shade-plugin/examples/class-relocation.html



to move the classes.

0


source







All Articles