Skip to content

Docker client dependencies can cause conflicts with Jersey, Jackson and other libs #35

@rnorth

Description

@rnorth

When attempting to integrate Testcontainers into a project that uses Dropwizard 0.8.1 (Jersey 2.17), I've been getting some bad dependency clashes despite our use of the shaded docker-client lib.

After some head-scratching and experimenting with various options, what eventually worked was

  • making a temporary version of testcontainers that depends on the non-shaded version of docker-client

  • use maven dependencyManagement to force the crossover Jersey dependencies into sync:

        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-client</artifactId>
            <version>2.17</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-common</artifactId>
            <version>2.17</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.connectors</groupId>
            <artifactId>jersey-apache-connector</artifactId>
            <version>2.17</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.media</groupId>
            <artifactId>jersey-media-json-jackson</artifactId>
            <version>2.17</version>
        </dependency>
    

I think it would be better to either not use the shaded version of the docker-client library, or make it optional (e.g. via a classifier).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions