com.github.docker-java is not shaded and conflicts with the project's version
envgap__testcontainers__testcontainers-java-1113
Original GitHub issue ↗Opened 2019-01-02
01 / FAILURE SIGNATURE
As reported upstream
Adding com.github.docker-java:docker-java to a project that uses testcontainers creates dependency conflicts. In a way this issue is related to [this one](https://github.com/testcontainers/testcontainers-java/issues/35) but that one is closed.
Not a benchmark task.
- No curated issue-specific recipe or verified environment fix is available.
02 / ENVIRONMENT RECIPE
- Base commit
Not freshly verified- Manifest
pom.xml- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
testcontainers/testcontainers-java #1113 · read the original issue
Adding com.github.docker-java:docker-java to a project that uses testcontainers creates dependency conflicts. In a way this issue is related to [this one](https://github.com/testcontainers/testcontainers-java/issues/35) but that one is closed.
This example with the below dependencies demonstrate the problem
```
import org.junit.Test;
import org.testcontainers.containers.MySQLContainer;
public class DockerJavaTest {
@Test
public void dockerJavaTest() {
MySQLContainer mySQLContainer = new MySQLContainer();
mySQLContainer.start();
mySQLContainer.stop();
}
}
```
```
plugins {
id 'java'
}
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
testCompile 'com.github.docker-java:docker-java:3.0.6'
testCompile "org.testcontainers:testcontainers:1.10.4"
testCompile "org.testcontainers:mysql:1.10.4"
testCompile "ch.qos.logback:logback-classic:1.2.2"
testCompile group: 'junit', name: 'junit', version: '4.12'
}
```
```
org.testcontainers.shaded.com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "ID" (class com.github.dockerjava.api.model.Info), not marked as ignorable (48 known properties: "systemStatus", "ipv4Forwarding", "httpsProxy", "discoveryBackend", "httpProxy", "clusterStore", "cpuCfsPeriod", "dockerRootDir", "containersRunning", "operatingSystem", "containers", "architecture", "initPath", "cpuSet", "containersStopped", "systemTime", "oomKillDisable", "registryConfig", "containersPaused", "oomScoreAdj", "experimentalBuild", "loggingDriver", "driver", "nfd", "noProxy", "memTotal", "cpuCfsQuota", "bridgeNfIp6tables", "initSha1", "images", "memoryLimit", "cpuShares", "osType", "indexServerAddress", "name", "bridgeNfIptables", "debug", "serverVersion", "id", "plugins", "driverStatuses", "ncpu", "labels", "executionDriver", "kernelVersion", "sockets", "swapLimit", "clusterAdvertise"])
at [Source: buffer(org.testcontainers.shaded.okhttp3.internal.http1.Http1Codec$ChunkedSource@4f209819).inputStream(); line: 1, column: 8] (through reference chain: com.github.dockerjava.api.model.Info["ID"])
at org.testcontainers.shaded.com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:51)
at org.testcontainers.shaded.com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:839)
at org.testcontainers.shaded.com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1045)
at org.testcontainers.shaded.com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1352)
at org.testcontainers.shaded.com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1330)
at org.testcontainers.shaded.com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeseriali04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]
Issue-specific recipe and runtime smoke command require review against the complete issue and repository.
Legacy reproduction is generic install-only; match the actual issue failure before admission.