Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ tasks.japicmp {

configurations.all {
resolutionStrategy {
force 'com.fasterxml.jackson.core:jackson-annotations:2.18.4'
force 'com.fasterxml.jackson.core:jackson-core:2.18.4'
force 'com.fasterxml.jackson.core:jackson-databind:2.18.4'
force 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.4'
}
Expand Down Expand Up @@ -83,12 +85,17 @@ dependencies {
api platform('com.github.docker-java:docker-java-bom:3.7.0')
shaded platform('com.github.docker-java:docker-java-bom:3.7.0')

api "com.github.docker-java:docker-java-api"
api("com.github.docker-java:docker-java-api") {
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-annotations'
}

shaded('com.github.docker-java:docker-java-core') {
exclude group: 'com.google.guava', module: 'guava'
}

shaded 'com.fasterxml.jackson.core:jackson-annotations:2.18.4'
shaded 'com.fasterxml.jackson.core:jackson-core:2.18.4'

api 'com.github.docker-java:docker-java-transport-zerodep'

shaded 'com.google.guava:guava:33.3.1-jre'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,20 @@ void testMetaInfServices() throws Exception {
.allMatch(it -> it.startsWith("org.testcontainers."));
}

@Test
void testJacksonAnnotationsAreShaded() throws Exception {
Path jacksonAnnotations = root.resolve("org/testcontainers/shaded/com/fasterxml/jackson/annotation");
assertThat(Files.exists(jacksonAnnotations))
.as("Jackson annotations should be shaded to avoid classpath conflicts")
.isTrue();
}

@Test
void testJacksonCoreIsShaded() throws Exception {
Path jacksonCore = root.resolve("org/testcontainers/shaded/com/fasterxml/jackson/core");
assertThat(Files.exists(jacksonCore)).as("Jackson core should be shaded to avoid classpath conflicts").isTrue();
}

private ListAssert<String> assertThatFileList(Path path) throws IOException {
return (ListAssert) assertThat(Files.list(path))
.extracting(Path::getFileName)
Expand Down