Skip to content

Commit 63ed3ea

Browse files
authored
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
1 parent c496e98 commit 63ed3ea

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

geode-wan/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ dependencies {
5252
distributedTestImplementation(project(':geode-dunit'))
5353
distributedTestImplementation(project(':geode-junit'))
5454

55+
distributedTestCompileOnly('javax.xml.bind:jaxb-api')
5556
distributedTestImplementation('mx4j:mx4j')
5657
distributedTestImplementation('org.awaitility:awaitility')
5758
distributedTestImplementation('junit:junit')

0 commit comments

Comments
 (0)