[ 
https://issues.apache.org/jira/browse/GEODE-10510?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jinwoo Hwang updated GEODE-10510:
---------------------------------
    Description: 
h3. Highlights
 * Java 17 LTS Required: Java 17 is now the minimum supported JDK version
 * Jakarta EE 10 Migration: Full migration from javax.* to jakarta.* namespace 
across all modules
 * Tomcat 10.1 & Jetty 12 Support: Session management compatibility with 
Jakarta EE 10
 * Spring Framework 6.x & Spring Security 6.x: Complete modernization of Spring 
stack
 * Apache HttpComponents 5.x Migration: Updated HTTP client infrastructure with 
HTTP/2 support
 * Spring Shell 3.x Migration: Complete GFSH modernization with improved 
command completion and terminal handling
 * Gradle 7.3.3 Upgrade: Enhanced build system with Java 17 and Jakarta EE 10 
support

h3. Features / Enhancements
 * GEODE-10465: Java 17 LTS Support
 ** Java 17 LTS is now the minimum required JDK version
 ** Full compatibility with Java 17 language features and APIs
 ** Module system compatibility

 * GEODE-10462: Jakarta EE 10 Migration
 ** Complete migration from javax.* to jakarta.* namespace across 173+ files
 ** Servlet API: javax.servlet → jakarta.servlet (Servlet 6.0)
 ** JTA: javax.transaction → jakarta.transaction
 ** JAXB: javax.xml.bind → jakarta.xml.bind
 ** JCA: javax.resource → jakarta.resource
 ** Mail: javax.mail → jakarta.mail
 ** Annotations: javax.annotation → jakarta.annotation
 ** CDI: javax.inject → jakarta.inject

 * Spring Framework 6.x Upgrade
 ** Spring Framework: 5.3.21 → 6.1.14
 ** Spring Boot: 2.6.7 → 3.3.5
 ** Spring HATEOAS: 1.5.0 → 2.3.3
 ** Spring LDAP: 2.4.0 → 3.2.7
 ** SpringDoc OpenAPI: 1.6.8 → 2.6.0
 ** Full Jakarta EE 10 compatibility

 * Spring Security 6.x Migration
 ** Spring Security: 5.6.5 → 6.3.4
 ** Migrated from WebSecurityConfigurerAdapter to SecurityFilterChain pattern
 ** Changed @EnableGlobalMethodSecurity to @EnableMethodSecurity
 ** Updated authorizeRequests() → authorizeHttpRequests()
 ** Updated antMatchers()/mvcMatchers() → requestMatchers()
 ** Fixed XSS protection API and headers configuration
 ** Updated all security configurations with lambda DSL syntax
 ** Enhanced CSRF protection for OAuth2 authentication in Pulse

 * Apache HttpComponents 5.x Migration
 ** HttpClient: 4.5.13 → 5.4.4
 ** HttpCore: 4.4.15 → 5.3.4
 ** Added httpcore5-h2 5.3.4 for HTTP/2 support
 ** Migrated all HTTP client code to HttpComponents 5.x APIs
 ** Updated SSL configuration with new connection manager architecture
 ** Modernized request/response handling and entity processing

 * GEODE-10466: Spring Shell 3.x Migration
 ** Migrated from Spring Shell 1.2.0 to 3.3.3
 ** Replaced Java Util Logging with Log4j2 for GFSH logging
 ** Updated JLine to 3.x for improved terminal handling
 ** Enhanced command completion with new provider architecture
 ** Added multi-line command support with improved signal handling
 ** Updated annotations: @CliCommand → @ShellMethod, @CliOption → @ShellOption
 ** Changed @CliAvailabilityIndicator → @ShellMethodAvailability
 ** Updated 118+ command classes across all modules

 * JLine 3.x Integration
 ** Migrated from JLine 2.x to JLine 3.x terminal implementation
 ** Updated GfshHistory to extend DefaultHistory
 ** Rewrote terminal implementations for JLine 3.x compatibility
 ** Updated LineReader and Terminal APIs throughout

 * GEODE-10462: Gradle 7.3.3 Upgrade
 ** Upgraded build system from Gradle 6.8.3 to 7.3.3
 ** Required for Java 17 and Jakarta EE 10 compatibility
 ** Improved build performance and toolchain support

 * Tomcat 10 Support
 ** Added geode-modules-tomcat10 module for Jakarta EE 10
 ** Migrated session management tests from Tomcat 6-9 to Tomcat 10
 ** Full session state module compatibility with Jakarta servlet API

 * Jetty 12 Support
 ** Upgraded from Jetty 9.4.57 to Jetty 12.0.27
 ** Migrated to Jetty EE10 namespace (org.eclipse.jetty.ee10.*)
 ** Updated HandlerCollection → Handler.Sequence
 ** Implemented Server Classes Pattern for webapp classloading
 ** Fixed webapp-first classloading with Jakarta API consistency

 * GEODE-9478: Status Command Enhancement
 ** Improved status command functionality in GFSH
 ** Better reporting and monitoring capabilities

 * Dependency Upgrades
 ** Jackson → 2.17.0
 ** HdrHistogram 2.1.12 → 2.2.2
 ** Micrometer → 1.14.0
 ** SLF4J license file updates
 ** Additional security-focused dependency updates beyond 1.15.2

h3. Breaking Changes
 * Java 17 LTS is now the minimum supported JDK version. Applications running 
on Java 11 or earlier must upgrade to Java 17 before upgrading to Geode 2.0.
 * Jakarta EE 10 Migration Required. All applications using javax.* imports 
(Servlet, JMS, JAXB, JTA, Mail, etc.) must migrate to jakarta.* namespace.
 * Spring Framework 6.x & Spring Security 6.x. Applications must upgrade to 
Spring Framework 6.x and Spring Security 6.x APIs:

WebSecurityConfigurerAdapter → SecurityFilterChain
@EnableGlobalMethodSecurity → @EnableMethodSecurity
authorizeRequests() → authorizeHttpRequests()
antMatchers() → requestMatchers()
 * Apache HttpComponents 5.x. Applications using HTTP client APIs must migrate 
from HttpClient 4.x to 5.x APIs with updated request/response handling and SSL 
configuration.
 * Spring Shell 3.x API Changes. Custom GFSH commands and plugins must be 
updated to use Spring Shell 3.x APIs:

@CliCommand → @ShellMethod
@CliOption → @ShellOption
@CliAvailabilityIndicator → @ShellMethodAvailability
h3. Migration Guide

Upgrading from Geode 1.15.x to 2.0
 # Java Version: Ensure Java 17 LTS or later is installed
 # Jakarta Migration: Update all javax.* imports to jakarta.*
javax.servlet.* → jakarta.servlet.*
javax.jms.* → jakarta.jms.*
javax.xml.bind.* → jakarta.xml.bind.*
javax.transaction.* → jakarta.transaction.*
javax.annotation.* → jakarta.annotation.*
 # Spring Framework: Upgrade to Spring Framework 6.x and Spring Boot 3.x
 # Spring Security: Migrate security configurations to Spring Security 6.x 
patterns
Replace WebSecurityConfigurerAdapter with SecurityFilterChain beans
Update @EnableGlobalMethodSecurity to @EnableMethodSecurity
Change authorizeRequests() to authorizeHttpRequests()
Update antMatchers() to requestMatchers()
 # Apache HttpComponents: Migrate HTTP client code from 4.x to 5.x APIs
 # Build System: Update build scripts for Gradle 7.3.3 compatibility
 # Session Management: If using Tomcat, upgrade to Tomcat 10.1 for Jakarta EE 
10 support
 # Custom GFSH Commands: Update Spring Shell APIs from 1.x to 3.x
 # Testing: Thoroughly test with Java 17 and Jakarta dependencies before 
production deployment

  was:
h2. Summary

Upgrade JLine from 2.x to 3.x to modernize GFSH terminal capabilities and 
support Spring Shell 3. This migration enhances command-line editing, history, 
and completion features.

{*}Impact{*}: GFSH terminal interface | {*}Risk{*}: High | {*}Timeline{*}: 3 
weeks
----
h2. Background
h3. Why Required
 * {*}Spring Shell 3 dependency{*}: Spring Shell 3.x requires JLine 3.x
 * {*}Modern terminal features{*}: Better Unicode support, improved completion
 * {*}Active maintenance{*}: JLine 2.x is no longer actively maintained
 * {*}Bug fixes{*}: JLine 3.x fixes many terminal handling issues

h3. Current State
 * {*}Current{*}: JLine 2.x (legacy)
 * {*}Target{*}: JLine 3.x (latest stable)
 * {*}Affected Module{*}: {{geode-gfsh}}
 * {*}Impact{*}: Terminal I/O, command history, tab completion

----
h2. Scope
h3. *In Scope*
 * Terminal reader/writer integration
 * Command-line editing (cursor movement, cut/paste)
 * Command history management
 * Tab completion rendering
 * ANSI color support
 * Terminal detection and configuration
 * Windows/Unix terminal compatibility

h3. *Breaking Changes*
||Component||JLine 2.x||JLine 3.x||Migration Effort||
|*Package*|{{jline.*}}|{{org.jline.*}}|🟡 Import updates|
|*Terminal*|{{ConsoleReader}}|{{LineReader}} + {{Terminal}}|🔴 API rewrite|
|*Completion*|{{Completer}} interface|{{Completer}} + {{Candidate}}|🟡 Moderate 
changes|
|*History*|{{History}} class|{{History}} interface|🟡 Refactoring needed|
|*ANSI Colors*|{{AnsiString}}|{{AttributedString}}|🟡 Color code updates|
|*Configuration*|System properties|{{LineReaderBuilder}}|🟡 Config migration|
----
h2. Implementation Plan
h3. *Phase 1: Dependency & Setup* (Week 1, Days 1-2)
 * [ ] Update JLine dependency to 3.x in {{DependencyConstraints.groovy}}
 * [ ] Resolve dependency conflicts
 * [ ] Set up feature branch: {{jline-3-migration}}
 * [ ] Create compatibility testing framework

h3. *Phase 2: Core Terminal Migration* (Week 1-2, Days 3-7)
 * [ ] Replace {{ConsoleReader}} with {{LineReader}}
 * [ ] Migrate {{Terminal}} initialization
 * [ ] Update terminal detection logic
 * [ ] Configure terminal attributes
 * [ ] Migrate input/output streams

h3. *Phase 3: History & Completion* (Week 2, Days 8-10)
 * [ ] Migrate command history implementation
 * [ ] Update history file handling
 * [ ] Migrate tab completion logic
 * [ ] Update {{Candidate}} generation for completions
 * [ ] Configure completion behavior

h3. *Phase 4: ANSI & Formatting* (Week 2-3, Days 11-12)
 * [ ] Migrate ANSI color codes to {{AttributedString}}
 * [ ] Update styled output rendering
 * [ ] Configure color schemes
 * [ ] Test color output on different terminals

h3. *Phase 5: Signal Handling & Advanced Features* (Week 3, Days 13-14)
 * [ ] Migrate signal handlers (Ctrl+C, Ctrl+D)
 * [ ] Update interrupt handling
 * [ ] Configure key bindings
 * [ ] Migrate custom widgets (if any)
 * [ ] Update terminal size detection

h3. *Phase 6: Testing & Validation* (Week 3, Days 15)
 * [ ] Unit tests for terminal I/O
 * [ ] Integration tests with GFSH commands
 * [ ] Cross-platform testing (Windows, Linux, macOS)
 * [ ] Terminal emulator testing (various terminals)
 * [ ] Performance testing

*Test Coverage:*
 * Command-line editing (insert, delete, move cursor)
 * History navigation (up/down arrows)
 * Tab completion rendering
 * ANSI color display
 * Multi-byte character support (Unicode)
 * Signal handling (interrupts)

----
h2. Technical Details
h3.  
h3. Architecture Changes
h3. Configuration Migration
h3. Key API Mappings
||JLine 2.x||JLine 3.x||Notes||
|{{ConsoleReader}}|{{LineReader}}|Main interface changed|
|{{readLine(prompt)}}|{{readLine(prompt)}}|✅ Same method|
|{{getHistory()}}|{{getHistory()}}|✅ Same method, different impl|
|{{addCompleter()}}|{{setCompleter()}}|Method name changed|
|{{CursorBuffer}}|{{Buffer}}|Internal buffer API changed|
|{{Terminal.getWidth()}}|{{Terminal.getSize().getColumns()}}|Size API changed|
----
h2. Risks & Mitigation
||Risk||Impact||Probability||Mitigation||
|*Terminal compatibility issues*|GFSH unusable on some 
platforms|Medium|Extensive cross-platform testing|
|*History file format changes*|Lost command history|Low|Migration script for 
history files|
|*Completion rendering broken*|Poor UX|Medium|Thorough completion testing|
|*Signal handling differences*|Ctrl+C doesn't work|Low|Test interrupt scenarios|
|*Performance regression*|Slow input response|Low|Benchmark testing|
|*Unicode issues*|Garbled characters|Medium|Multi-byte character testing|
----
h2. Dependencies
h3. *Blocked By*
 * Spring Shell 3 migration (directly depends on JLine 3)

h3. *Blocks*
 * Complete GFSH modernization
 * Spring Framework 6 migration completion

h3. *Related*
 * Spring Shell 3 migration
 * Jakarta EE 10 migration

----
h2. Success Criteria
 * [ ] JLine 3.x integrated and functional
 * [ ] All terminal operations work (input, output, editing)
 * [ ] Command history preserved and functional
 * [ ] Tab completion rendering correct
 * [ ] ANSI colors display properly
 * [ ] Cross-platform compatibility (Windows, Linux, macOS)
 * [ ] No performance regression
 * [ ] All tests passing
 * [ ] Signal handling (Ctrl+C, Ctrl+D) works

----
h2. Testing Strategy
h3. *Unit Tests*
 * Terminal initialization
 * Line reading functionality
 * History management
 * Completion rendering
 * ANSI color formatting

h3. *Integration Tests*
 * Full GFSH session
 * Command execution with JLine
 * History persistence across sessions
 * Tab completion in real scenarios

h3. *Edge Cases*
 * Very long command lines (> 1000 chars)
 * Multi-byte characters (Chinese, Japanese, emoji)
 * Terminal resize during input
 * Interrupted input (Ctrl+C)
 * End-of-file (Ctrl+D)
 * Paste large text blocks

----
h2. Resources
 * {*}Development{*}: 3 person-weeks (1 developer × 3 weeks)
 * {*}QA{*}: 1 week (cross-platform testing)
 * {*}Total Effort{*}: ~4 person-weeks

----
h2. References
h3. *Documentation*
 * [JLine 3.x Documentation|https://github.com/jline/jline3/wiki]
 * [JLine 2 to 3 Migration 
Guide|https://github.com/jline/jline3/wiki/Migrating-from-JLine-2.x]
 * [Spring Shell 3 + JLine 3 
Integration|https://docs.spring.io/spring-shell/docs/current/reference/htmlsingle/]

h3. *Related Issues*
 * Spring Shell 3 Migration
 * Spring Framework 6 Migration

 
----
h2. Migration Checklist
h3. Pre-Migration
 * [ ] Audit current JLine 2 usage in geode-gfsh
 * [ ] Document custom terminal configurations
 * [ ] Back up command history format
 * [ ] Identify platform-specific code

h3. Migration
 * [ ] Update dependencies
 * [ ] Migrate ConsoleReader → LineReader
 * [ ] Migrate Terminal initialization
 * [ ] Update Completers
 * [ ] Migrate History handling
 * [ ] Update ANSI/color code
 * [ ] Fix signal handlers

h3. Post-Migration
 * [ ] Platform testing complete
 * [ ] Performance validated
 * [ ] User documentation updated
 * [ ] Migration guide published

----
h2. Notes
h3. *Critical Integration Point*

JLine 3 migration *must be coordinated* with Spring Shell 3 migration, as 
Spring Shell 3 has built-in JLine 3 integration. Consider migrating these 
together.


> Create Release Note for Apache Geode 2.0
> ----------------------------------------
>
>                 Key: GEODE-10510
>                 URL: https://issues.apache.org/jira/browse/GEODE-10510
>             Project: Geode
>          Issue Type: Improvement
>            Reporter: Jinwoo Hwang
>            Assignee: Jinwoo Hwang
>            Priority: Major
>             Fix For: 2.0.0
>
>
> h3. Highlights
>  * Java 17 LTS Required: Java 17 is now the minimum supported JDK version
>  * Jakarta EE 10 Migration: Full migration from javax.* to jakarta.* 
> namespace across all modules
>  * Tomcat 10.1 & Jetty 12 Support: Session management compatibility with 
> Jakarta EE 10
>  * Spring Framework 6.x & Spring Security 6.x: Complete modernization of 
> Spring stack
>  * Apache HttpComponents 5.x Migration: Updated HTTP client infrastructure 
> with HTTP/2 support
>  * Spring Shell 3.x Migration: Complete GFSH modernization with improved 
> command completion and terminal handling
>  * Gradle 7.3.3 Upgrade: Enhanced build system with Java 17 and Jakarta EE 10 
> support
> h3. Features / Enhancements
>  * GEODE-10465: Java 17 LTS Support
>  ** Java 17 LTS is now the minimum required JDK version
>  ** Full compatibility with Java 17 language features and APIs
>  ** Module system compatibility
>  * GEODE-10462: Jakarta EE 10 Migration
>  ** Complete migration from javax.* to jakarta.* namespace across 173+ files
>  ** Servlet API: javax.servlet → jakarta.servlet (Servlet 6.0)
>  ** JTA: javax.transaction → jakarta.transaction
>  ** JAXB: javax.xml.bind → jakarta.xml.bind
>  ** JCA: javax.resource → jakarta.resource
>  ** Mail: javax.mail → jakarta.mail
>  ** Annotations: javax.annotation → jakarta.annotation
>  ** CDI: javax.inject → jakarta.inject
>  * Spring Framework 6.x Upgrade
>  ** Spring Framework: 5.3.21 → 6.1.14
>  ** Spring Boot: 2.6.7 → 3.3.5
>  ** Spring HATEOAS: 1.5.0 → 2.3.3
>  ** Spring LDAP: 2.4.0 → 3.2.7
>  ** SpringDoc OpenAPI: 1.6.8 → 2.6.0
>  ** Full Jakarta EE 10 compatibility
>  * Spring Security 6.x Migration
>  ** Spring Security: 5.6.5 → 6.3.4
>  ** Migrated from WebSecurityConfigurerAdapter to SecurityFilterChain pattern
>  ** Changed @EnableGlobalMethodSecurity to @EnableMethodSecurity
>  ** Updated authorizeRequests() → authorizeHttpRequests()
>  ** Updated antMatchers()/mvcMatchers() → requestMatchers()
>  ** Fixed XSS protection API and headers configuration
>  ** Updated all security configurations with lambda DSL syntax
>  ** Enhanced CSRF protection for OAuth2 authentication in Pulse
>  * Apache HttpComponents 5.x Migration
>  ** HttpClient: 4.5.13 → 5.4.4
>  ** HttpCore: 4.4.15 → 5.3.4
>  ** Added httpcore5-h2 5.3.4 for HTTP/2 support
>  ** Migrated all HTTP client code to HttpComponents 5.x APIs
>  ** Updated SSL configuration with new connection manager architecture
>  ** Modernized request/response handling and entity processing
>  * GEODE-10466: Spring Shell 3.x Migration
>  ** Migrated from Spring Shell 1.2.0 to 3.3.3
>  ** Replaced Java Util Logging with Log4j2 for GFSH logging
>  ** Updated JLine to 3.x for improved terminal handling
>  ** Enhanced command completion with new provider architecture
>  ** Added multi-line command support with improved signal handling
>  ** Updated annotations: @CliCommand → @ShellMethod, @CliOption → @ShellOption
>  ** Changed @CliAvailabilityIndicator → @ShellMethodAvailability
>  ** Updated 118+ command classes across all modules
>  * JLine 3.x Integration
>  ** Migrated from JLine 2.x to JLine 3.x terminal implementation
>  ** Updated GfshHistory to extend DefaultHistory
>  ** Rewrote terminal implementations for JLine 3.x compatibility
>  ** Updated LineReader and Terminal APIs throughout
>  * GEODE-10462: Gradle 7.3.3 Upgrade
>  ** Upgraded build system from Gradle 6.8.3 to 7.3.3
>  ** Required for Java 17 and Jakarta EE 10 compatibility
>  ** Improved build performance and toolchain support
>  * Tomcat 10 Support
>  ** Added geode-modules-tomcat10 module for Jakarta EE 10
>  ** Migrated session management tests from Tomcat 6-9 to Tomcat 10
>  ** Full session state module compatibility with Jakarta servlet API
>  * Jetty 12 Support
>  ** Upgraded from Jetty 9.4.57 to Jetty 12.0.27
>  ** Migrated to Jetty EE10 namespace (org.eclipse.jetty.ee10.*)
>  ** Updated HandlerCollection → Handler.Sequence
>  ** Implemented Server Classes Pattern for webapp classloading
>  ** Fixed webapp-first classloading with Jakarta API consistency
>  * GEODE-9478: Status Command Enhancement
>  ** Improved status command functionality in GFSH
>  ** Better reporting and monitoring capabilities
>  * Dependency Upgrades
>  ** Jackson → 2.17.0
>  ** HdrHistogram 2.1.12 → 2.2.2
>  ** Micrometer → 1.14.0
>  ** SLF4J license file updates
>  ** Additional security-focused dependency updates beyond 1.15.2
> h3. Breaking Changes
>  * Java 17 LTS is now the minimum supported JDK version. Applications running 
> on Java 11 or earlier must upgrade to Java 17 before upgrading to Geode 2.0.
>  * Jakarta EE 10 Migration Required. All applications using javax.* imports 
> (Servlet, JMS, JAXB, JTA, Mail, etc.) must migrate to jakarta.* namespace.
>  * Spring Framework 6.x & Spring Security 6.x. Applications must upgrade to 
> Spring Framework 6.x and Spring Security 6.x APIs:
> WebSecurityConfigurerAdapter → SecurityFilterChain
> @EnableGlobalMethodSecurity → @EnableMethodSecurity
> authorizeRequests() → authorizeHttpRequests()
> antMatchers() → requestMatchers()
>  * Apache HttpComponents 5.x. Applications using HTTP client APIs must 
> migrate from HttpClient 4.x to 5.x APIs with updated request/response 
> handling and SSL configuration.
>  * Spring Shell 3.x API Changes. Custom GFSH commands and plugins must be 
> updated to use Spring Shell 3.x APIs:
> @CliCommand → @ShellMethod
> @CliOption → @ShellOption
> @CliAvailabilityIndicator → @ShellMethodAvailability
> h3. Migration Guide
> Upgrading from Geode 1.15.x to 2.0
>  # Java Version: Ensure Java 17 LTS or later is installed
>  # Jakarta Migration: Update all javax.* imports to jakarta.*
> javax.servlet.* → jakarta.servlet.*
> javax.jms.* → jakarta.jms.*
> javax.xml.bind.* → jakarta.xml.bind.*
> javax.transaction.* → jakarta.transaction.*
> javax.annotation.* → jakarta.annotation.*
>  # Spring Framework: Upgrade to Spring Framework 6.x and Spring Boot 3.x
>  # Spring Security: Migrate security configurations to Spring Security 6.x 
> patterns
> Replace WebSecurityConfigurerAdapter with SecurityFilterChain beans
> Update @EnableGlobalMethodSecurity to @EnableMethodSecurity
> Change authorizeRequests() to authorizeHttpRequests()
> Update antMatchers() to requestMatchers()
>  # Apache HttpComponents: Migrate HTTP client code from 4.x to 5.x APIs
>  # Build System: Update build scripts for Gradle 7.3.3 compatibility
>  # Session Management: If using Tomcat, upgrade to Tomcat 10.1 for Jakarta EE 
> 10 support
>  # Custom GFSH Commands: Update Spring Shell APIs from 1.x to 3.x
>  # Testing: Thoroughly test with Java 17 and Jakarta dependencies before 
> production deployment



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

Reply via email to