From 6b8da5372f300204558be0e4cab413c206afd5bd Mon Sep 17 00:00:00 2001 From: Jinwoo Hwang Date: Fri, 24 Oct 2025 21:02:02 -0400 Subject: [PATCH] Fix JAXB compilation warnings in geode-wan distributedTest Add javax.xml.bind:jaxb-api dependency to geode-wan's distributedTest compile classpath to resolve compilation warnings about missing XmlAccessType enum constant. Problem: The geode-wan module's distributedTest compilation was generating warnings: warning: unknown enum constant XmlAccessType.FIELD reason: class file for jakarta.xml.bind.annotation.XmlAccessType not found Root Cause: The distributed test code references JAXB annotations (such as @XmlAccessorType) through transitive dependencies from geode-core and other modules, but the JAXB API was not explicitly declared as a compile-time dependency for the distributedTest source set. This caused the Java annotation processor to be unable to resolve the XmlAccessType enum during compilation. Solution: Added 'javax.xml.bind:jaxb-api' to distributedTestCompileOnly configuration in geode-wan/build.gradle. This ensures the JAXB API is available during compilation of distributed test code, allowing the annotation processor to properly resolve JAXB annotations. The compileOnly scope is appropriate here since: - JAXB API is only needed at compile time for annotation processing - Runtime implementation is provided by other modules' dependencies - Keeps the test classpath minimal Testing: Verified with: ./gradlew :geode-wan:compileDistributedTestJava Build completes successfully without JAXB warnings. Related modules using similar pattern: - geode-core: has jaxb-api in implementation scope - geode-gfsh: has jaxb-api in implementation scope - geode-connectors: has jaxb-api in implementation scope - geode-web-api: has jaxb-api in implementation scope --- geode-wan/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/geode-wan/build.gradle b/geode-wan/build.gradle index 4e500ddcac4f..d89726622b72 100644 --- a/geode-wan/build.gradle +++ b/geode-wan/build.gradle @@ -52,6 +52,7 @@ dependencies { distributedTestImplementation(project(':geode-dunit')) distributedTestImplementation(project(':geode-junit')) + distributedTestCompileOnly('javax.xml.bind:jaxb-api') distributedTestImplementation('mx4j:mx4j') distributedTestImplementation('org.awaitility:awaitility') distributedTestImplementation('junit:junit')