exclude transitive shaded dependency in maven

Boris Borovski :

In my project i want to exclude jackson-databind from tinkerpop. It doesn't get excluded. I have open the pom.xml of tinkerpop https://github.com/apache/tinkerpop/blob/master/gremlin-shaded/pom.xml and I can see jackson is shaded. I have tried to exclude it:

<groupId> org.apache.tinkerpop.shaded.jackson </groupId> also this way <groupId>com.fasterxml.jackson.core</groupId>

Both approaches didn't worked out.

<dependencies>
        <dependency>
            <groupId>org.apache.tinkerpop</groupId>
            <artifactId>gremlin-driver</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-all</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.tinkerpop.shaded.jackson</groupId> // com.fasterxml.jackson.core
                    <artifactId>jackson-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
<dependencies>

How to exclude the shaded dependency ? Thank you

JF Meier :

If tinkerpop shaded the other jar, and included the resulting classes into the final tinkerpop jar (which is usually be the case), then this other jar cannot be excluded because it has become part of tinkerpop.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=360178&siteId=1