解决jar冲突我们一般使用exclusoion 将其从依赖中排除。但是有情况下我们还需要include对应的一些依赖类,这个时候需要使用include的方式将对应的类打进jar内。 为了考虑jar冲突的问题,在jar中加入对应的类的同时需要使用relocation的方式将相关的类进行包名的relocation。 relocation中需要注意设置false 为false,这样relocation之前对应的类不会打进对应的jar内。
4.0.0 xxxx xxxx xxxx jar xxx xxx xxx fastjson com.alibaba org.apache.maven.plugins maven-shade-plugin 2.4.3 org.apache.maven.plugins maven-shade-plugin 2.4.3 package shade com.fasterxml.jackson shaded.com.fasterxml.jackson com.fasterxml.jackson.core:jackson-core com.fasterxml.jackson.core:jackson-databind com.fasterxml.jackson.core:jackson-annotations false



