From b007eefb80abd06e51ffbf3ff6681ed4249d933e Mon Sep 17 00:00:00 2001 From: Jonas Konrad Date: Mon, 16 Oct 2023 11:04:14 +0200 Subject: [PATCH] Remove transitive jackson-databind dependency from httpclient-netty (#725) * Remove transitive jackson-databind dependency from httpclient-netty * remove one superfluous exclude --- oraclecloud-httpclient-netty/build.gradle | 8 +++++--- .../oraclecloud/serde/NoJacksonOnClasspath.groovy | 12 ++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 oraclecloud-httpclient-netty/src/test/groovy/io/micronaut/oraclecloud/serde/NoJacksonOnClasspath.groovy diff --git a/oraclecloud-httpclient-netty/build.gradle b/oraclecloud-httpclient-netty/build.gradle index 21d902bb1..b7acb6b05 100644 --- a/oraclecloud-httpclient-netty/build.gradle +++ b/oraclecloud-httpclient-netty/build.gradle @@ -6,8 +6,10 @@ dependencies { annotationProcessor mnSerde.micronaut.serde.processor implementation mn.netty.codec.http - implementation libs.oci.common - api libs.oci.common.httpclient + implementation(libs.oci.common) { + exclude(group:"com.fasterxml.jackson.core", module:"jackson-databind") + } + api(libs.oci.common.httpclient) api mnSerde.micronaut.serde.api implementation mn.micronaut.http.client implementation mn.reactor @@ -24,7 +26,7 @@ dependencies { testAnnotationProcessor mn.micronaut.inject.java testAnnotationProcessor projects.micronautOraclecloudSerdeProcessor - testRuntimeOnly mn.micronaut.jackson.databind + testCompileOnly mn.micronaut.jackson.databind testRuntimeOnly mn.micronaut.runtime testImplementation mn.micronaut.inject.java.test diff --git a/oraclecloud-httpclient-netty/src/test/groovy/io/micronaut/oraclecloud/serde/NoJacksonOnClasspath.groovy b/oraclecloud-httpclient-netty/src/test/groovy/io/micronaut/oraclecloud/serde/NoJacksonOnClasspath.groovy new file mode 100644 index 000000000..ffc767d31 --- /dev/null +++ b/oraclecloud-httpclient-netty/src/test/groovy/io/micronaut/oraclecloud/serde/NoJacksonOnClasspath.groovy @@ -0,0 +1,12 @@ +package io.micronaut.oraclecloud.serde + +import spock.lang.Specification + +class NoJacksonOnClasspath extends Specification { + def 'no jackson on classpath'() { + when: + Class.forName("com.fasterxml.jackson.databind.ObjectMapper") + then: + thrown ClassNotFoundException + } +}