[ 
https://issues.apache.org/jira/browse/GEODE-10465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18024386#comment-18024386
 ] 

ASF subversion and git services commented on GEODE-10465:
---------------------------------------------------------

Commit 7ec0626dca5637efebb718eca65ccba7ce2790c9 in geode's branch 
refs/heads/develop from Sai Boorlagadda
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=7ec0626dca ]

GEODE-10465: Fix RAT failures by adding missing **/bin/** exclusion pattern 
(#7939)

This commit addresses RAT (Release Audit Tool) failures that occur when 
IDE-generated
bin/ directories are present in the workspace. The issue was caused by a missing
exclusion pattern that should have been included during the build system 
refactoring
in May 2022.

Root Cause Analysis:
- In April 2017, **/bin/** exclusion was added to RAT configuration (commit 
4a09e88b69)
- Later removed due to legitimate bin/ folders in source tree (commit 
39c72b2046)
- During May 2022 build system refactoring (commit 509c0c6c91), the RAT 
configuration
  was moved from gradle/rat.gradle to 
build-tools/scripts/src/main/groovy/geode-rat.gradle
- The **/bin/** exclusion pattern was inadvertently omitted from the new 
configuration

Problem:
- IDEs (Eclipse, IntelliJ) generate bin/ directories containing compiled 
classes,
  test resources, and other build artifacts
- These files lack Apache license headers and cause RAT failures
- The .gitignore already excludes bin/ folders, indicating they are build 
artifacts

Solution:
- Add '**/bin/**' exclusion pattern to RAT configuration
- This prevents RAT from scanning IDE-generated build artifacts
- Consistent with existing exclusions for other build directories (**/build/**)
- Aligns with .gitignore patterns that already exclude bin/ folders

Testing:
- Verified RAT passes with and without bin/ directories present
- Confirmed exclusion works for files without license headers in bin/ folders
- No impact on legitimate source files that require license headers

This fix prevents future RAT failures for developers using IDEs that generate
bin/ directories during normal development workflow.

> Migrate Apache Geode to Java 17: JAXB Integration, Module System 
> Compatibility, and Test Infrastructure Modernization
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: GEODE-10465
>                 URL: https://issues.apache.org/jira/browse/GEODE-10465
>             Project: Geode
>          Issue Type: Improvement
>            Reporter: Jinwoo Hwang
>            Assignee: Jinwoo Hwang
>            Priority: Major
>              Labels: pull-request-available
>
> *Summary:* Migrate Apache Geode from Java 8 to Java 17, including JAXB 
> dependency integration, module system compatibility, test infrastructure 
> modernization, and comprehensive build system updates.
> *Description:*
> This project upgrades the entire Apache Geode project from Java 8 to Java 17, 
> addressing all compilation issues, dependency conflicts, module system 
> restrictions, and test infrastructure compatibility that arose from this 
> major version upgrade. The migration ensures compatibility with modern Java 
> features and security improvements while maintaining backward compatibility 
> for existing functionality.
> h3. Key Changes:
> h4. 1. *Core Java Version Updates*
>  * Update {{sourceCompatibility}} and {{targetCompatibility}} from 1.8 to 17 
> in geode-java.gradle
>  * Modify CodeQL workflow (codeql.yml) to use Java 17
>  * Update Gradle wrapper to version 7.3.3 for Java 17 compatibility
>  * Set minimum Java version requirement to 17 in build validation
> h4. 2. *Build System and Module Configuration*
>  * Add comprehensive {{--add-exports}} flags in gradle.properties to handle 
> module system restrictions:
>  ** {{jdk.compiler}} exports for compilation tools
>  ** java.management exports for JMX security
>  ** java.base opens for reflection access
>  * Updated JVM arguments for Gradle daemon with proper module exports
>  * Modified compiler configuration to handle Java 17 stricter type checking
> h4. 3. *Dependency Management*
>  * {*}JAXB Integration{*}: Add external JAXB dependencies across multiple 
> modules since JAXB was removed from JDK 11+
>  ** Add {{javax.xml.bind:jaxb-api}} and {{com.sun.xml.bind:jaxb-impl}} to 
> affected modules
>  ** Update geode-assembly, geode-gfsh, geode-lucene, geode-web-api build files
>  * {*}Internal API Access{*}: Add 
> {{--add-exports=java.base/sun.security.x509=ALL-UNNAMED}} for certificate 
> handling in geode-junit
> h4. 4. *Code Compatibility Fixes*
>  * {*}QCompiler.java{*}: Fix {{ClassCastException}} in GROUP BY clause 
> compilation
>  ** Change type casting from List<CompiledPath> to List<CompiledValue> using 
> TypeUtils.checkCast
>  ** Ensures compatibility with Java 17's stricter type system
>  * {*}Type System Updates{*}: Update method signatures and type declarations 
> for Java 17 compatibility
> h4. 5. *Documentation and Javadoc*
>  * Update Javadoc configuration for HTML5 compatibility:
>  ** Remove {{-Xwerror}} flag that treated HTML5 warnings as errors
>  ** Add {{-Xdoclint:none}} option for lenient documentation processing
>  ** Update API documentation links from Java 8 to Java 17
>  * Exclude legacy {{UnitTestDoclet}} from compilation (removed from Java 17)
> h4. 6. *Test Infrastructure Migration and Modernization*
>  * {*}Mockito Infrastructure Upgrade{*}: Modernize test mocking to leverage 
> Java 17's enhanced type system
>  ** Migrate {{LocatorClusterManagementServiceTest.java}} from 
> {{OperationResult}} to {{RebalanceResult}} mocks
>  ** Implement type-safe interface-based mocking patterns
>  * {*}JUnit Platform Integration{*}: Integrate JUnit 5 with Java 17 module 
> system
>  * {*}Test Utility Modernization{*}: Update {{UncheckedUtilsTest.java}} for 
> modern utility method patterns
>  * {*}Runtime Infrastructure Enhancement{*}:
>  ** Validation of complete test execution infrastructure on Java 17
>  ** Validation of 244 test infrastructure tasks
>  ** Zero infrastructure compatibility issues with new runtime environment
> h3. Technical Impact:
> h4. *Benefits:*
>  * {*}Security{*}: Access to latest Java security patches and improvements
>  * {*}Performance{*}: Leverages Java 17 performance optimizations and garbage 
> collection improvements
>  * {*}Modern Features{*}: Enables use of Java 9-17 language features and APIs
>  * {*}Long-term Support{*}: Java 17 is an LTS release ensuring long-term 
> maintainability
>  * {*}Ecosystem Compatibility{*}: Better integration with modern Java tools 
> and frameworks
> h4. *Modernized Testing Platform:*
>  * {*}Enhanced Type Safety{*}: Java 17's advanced type checking strengthens 
> test infrastructure reliability
>  * {*}Improved Test Architecture{*}: Updated mocking infrastructure ensures 
> tests accurately model production systems
>  * {*}Future-Ready Infrastructure{*}: Test platform aligns with modern Java 
> testing ecosystem
>  * {*}Comprehensive Infrastructure Coverage{*}: All testing scenarios 
> preserved while upgrading underlying infrastructure
> h4. *Risk Assessment:*
>  * {*}Low Risk{*}: All compilation and test issues have been systematically 
> identified and resolved
>  * {*}Backward Compatibility{*}: Maintained through careful dependency 
> management and API usage
>  * {*}Testing Coverage{*}: All existing tests pass with the new Java version
>  * {*}Build Validation{*}: Complete clean build verification ensures no 
> regressions
> h3. Validation Criteria:
>  *  Project compiles cleanly on Java 17
>  *  All existing tests pass
>  *  No new compiler warnings introduced
>  *  JAXB functionality works correctly
>  *  Documentation builds successfully
>  *  CI/CD pipeline compatible with Java 17
>  *  Module system restrictions properly handled
>  *  Test infrastructure modernized and validated
>  *  No performance regressions observed
> h3. Test Infrastructure Migration Impact:
>  * {*}Zero Infrastructure Regressions{*}: All existing test functionality 
> preserved through infrastructure upgrade
>  * {*}Enhanced Infrastructure Safety{*}: Stricter compile-time infrastructure 
> validation prevents runtime errors
>  * {*}Modern Testing Patterns{*}: Infrastructure updated to leverage Java 17 
> testing best practices
>  * {*}Sustainable Test Infrastructure{*}: Platform changes support long-term 
> infrastructure maintainability
> h3. Next Steps:
>  # Update developer documentation with Java 17 setup instructions
>  # Verify CI/CD pipeline integration with Java 17
>  # Monitor for any runtime issues in development environments
>  # Plan deprecation timeline for Java 8 support documentation



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to