Fix JAXB compilation warnings in geode-wan distributedTest #7947
+1
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR resolves JAXB-related compilation warnings in the
geode-wanmodule's distributed test compilation by adding the missingjavax.xml.bind:jaxb-apidependency.Problem
When compiling the
geode-wan:compileDistributedTestJavatask, the following warnings were generated:Root Cause
The distributed test code in
geode-wanreferences JAXB annotations (such as@XmlAccessorType) through transitive dependencies fromgeode-coreand other modules. However, the JAXB API was not explicitly declared as a compile-time dependency for thedistributedTestsource set.This caused the Java annotation processor to be unable to resolve the
XmlAccessTypeenum during compilation, resulting in the warnings above.Solution
Added
javax.xml.bind:jaxb-apito thedistributedTestCompileOnlyconfiguration ingeode-wan/build.gradle:distributedTestCompileOnly('javax.xml.bind:jaxb-api')Why
compileOnlyscope?The
compileOnlyscope is appropriate here because:Changes
Modified Files
geode-wan/build.gradle- Added JAXB API dependency to distributedTest compile classpathDiff Summary
distributedTestImplementation(project(':geode-gfsh')) distributedTestImplementation(project(':geode-dunit')) distributedTestImplementation(project(':geode-junit')) + distributedTestCompileOnly('javax.xml.bind:jaxb-api') distributedTestImplementation('mx4j:mx4j') distributedTestImplementation('org.awaitility:awaitility')Testing
Verification Steps
./gradlew :geode-wan:compileDistributedTestJavaTest Results
✅ No JAXB warnings
✅ Build successful
✅ All tasks completed without errors
Related Modules
Other Geode modules follow a similar pattern for JAXB dependencies:
geode-coreimplementationgeode-gfshimplementationgeode-connectorsimplementationgeode-web-apiimplementationgeode-luceneimplementationgeode-assemblydistributedTestImplementationThis change brings
geode-wanin line with the established pattern for handling JAXB dependencies across the project.Impact
Build Impact
Compatibility
Checklist
Additional Context
This fix is part of ensuring clean compilation across all Geode modules and maintaining consistency in dependency management, particularly for Java 17+ where JAXB was removed from the JDK and must be explicitly included as a dependency.
For all changes, please confirm:
develop)?gradlew buildrun cleanly?