From b8add540bb590fd3e9d403e56397b4122806e044 Mon Sep 17 00:00:00 2001 From: Marco Fargetta Date: Dec 04 2023 16:22:20 +0000 Subject: Fix build for java 11 When java 11 is detected the preview features are enabled generating problems with other libraries built on this. Since these features are not needed for the library to work the option is removed from the pom file before to compile the package. --- diff --git a/jackson-databind.spec b/jackson-databind.spec index ebba7cf..d6dbe1e 100644 --- a/jackson-databind.spec +++ b/jackson-databind.spec @@ -44,6 +44,7 @@ sed -i 's/\r//' LICENSE NOTICE %pom_remove_dep javax.measure:jsr-275 rm src/test/java/com/fasterxml/jackson/databind/introspect/NoClassDefFoundWorkaroundTest.java %pom_xpath_remove pom:classpathDependencyExcludes +%pom_xpath_remove '//pom:compilerArgs/pom:arg[contains(text(),"enable-preview")]' # TestTypeFactoryWithClassLoader fails to compile # - it's the only test that uses powermock, so drop the powermock dependencies