This is an automated email from the ASF dual-hosted git repository.

engelen pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new 63ed3ea1b2 Fix JAXB compilation warnings in geode-wan distributedTest 
(#7947)
63ed3ea1b2 is described below

commit 63ed3ea1b20028594ece88fbdd562df1c282b99d
Author: Jinwoo Hwang <[email protected]>
AuthorDate: Mon Oct 27 11:08:15 2025 -0400

    Fix JAXB compilation warnings in geode-wan distributedTest (#7947)
    
    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 4e500ddcac..d89726622b 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')

Reply via email to