From c09125a111d1571904ef07a8d6cb8121375f59d6 Mon Sep 17 00:00:00 2001 From: Abhishek Inani Date: Tue, 12 Mar 2024 15:54:48 +0530 Subject: [PATCH 1/9] Regex Pattern updated to support gemfire --- lib/java_buildpack/container/tomcat/tomcat_geode_store.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb b/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb index 5973f26fe..cec7d1d42 100644 --- a/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb +++ b/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb @@ -137,7 +137,7 @@ def create_cache_client_xml def detect_geode_tomcat_version geode_tomcat_version = nil - geode_modules_tomcat_pattern = /ge.*-modules-tomcat(?[0-9]*).*.jar/.freeze + geode_modules_tomcat_pattern = /ge.*-tomcat(?[0-9]*).*.jar/.freeze Dir.foreach(@droplet.sandbox + 'lib') do |file| if geode_modules_tomcat_pattern.match(file) unless geode_tomcat_version.nil? From 3be6c48657cbd2cf2046d6ce5481eccb34dbd6b3 Mon Sep 17 00:00:00 2001 From: Abhishek Inani Date: Tue, 12 Mar 2024 16:38:17 +0530 Subject: [PATCH 2/9] Debug print --- lib/java_buildpack/container/tomcat/tomcat_geode_store.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb b/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb index cec7d1d42..0e9d71af0 100644 --- a/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb +++ b/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb @@ -136,7 +136,7 @@ def create_cache_client_xml def detect_geode_tomcat_version geode_tomcat_version = nil - + puts "===DEBUG ABHISHEK===" geode_modules_tomcat_pattern = /ge.*-tomcat(?[0-9]*).*.jar/.freeze Dir.foreach(@droplet.sandbox + 'lib') do |file| if geode_modules_tomcat_pattern.match(file) @@ -146,6 +146,8 @@ def detect_geode_tomcat_version end geode_tomcat_version = geode_modules_tomcat_pattern.match(file).named_captures['version'] + puts "===DEBUG ABHISHEK===" + puts geode_tomcat_version end end From aaf05b411cd194a471f392127acd6d4663e5d71d Mon Sep 17 00:00:00 2001 From: Abhishek Inani Date: Tue, 12 Mar 2024 17:08:48 +0530 Subject: [PATCH 3/9] another debug --- lib/java_buildpack/container/tomcat/tomcat_geode_store.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb b/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb index 0e9d71af0..ea9b661c1 100644 --- a/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb +++ b/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb @@ -137,9 +137,12 @@ def create_cache_client_xml def detect_geode_tomcat_version geode_tomcat_version = nil puts "===DEBUG ABHISHEK===" + puts @droplet.sandbox + 'lib' geode_modules_tomcat_pattern = /ge.*-tomcat(?[0-9]*).*.jar/.freeze Dir.foreach(@droplet.sandbox + 'lib') do |file| if geode_modules_tomcat_pattern.match(file) + puts "===DEBUG ABHISHEK===" + puts file unless geode_tomcat_version.nil? raise('Multiple versions of geode-modules-tomcat jar found. ' \ 'Please verify your geode_store tar only contains one geode-modules-tomcat jar.') From 26be466a14b2840d169b07a0a39e1ccd7d41e36c Mon Sep 17 00:00:00 2001 From: Abhishek Inani Date: Tue, 12 Mar 2024 18:18:39 +0530 Subject: [PATCH 4/9] few more debug statements --- lib/java_buildpack/container/tomcat/tomcat_geode_store.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb b/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb index ea9b661c1..ba9758765 100644 --- a/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb +++ b/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb @@ -140,9 +140,9 @@ def detect_geode_tomcat_version puts @droplet.sandbox + 'lib' geode_modules_tomcat_pattern = /ge.*-tomcat(?[0-9]*).*.jar/.freeze Dir.foreach(@droplet.sandbox + 'lib') do |file| + puts "===DEBUG ABHISHEK===" + puts file if geode_modules_tomcat_pattern.match(file) - puts "===DEBUG ABHISHEK===" - puts file unless geode_tomcat_version.nil? raise('Multiple versions of geode-modules-tomcat jar found. ' \ 'Please verify your geode_store tar only contains one geode-modules-tomcat jar.') From 3b7a51855c665ddaae9a2aa9e376e390255f59bb Mon Sep 17 00:00:00 2001 From: Abhishek Inani Date: Tue, 12 Mar 2024 18:38:29 +0530 Subject: [PATCH 5/9] Removed debug statements --- lib/java_buildpack/container/tomcat/tomcat_geode_store.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb b/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb index ba9758765..98dd44bb3 100644 --- a/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb +++ b/lib/java_buildpack/container/tomcat/tomcat_geode_store.rb @@ -136,12 +136,8 @@ def create_cache_client_xml def detect_geode_tomcat_version geode_tomcat_version = nil - puts "===DEBUG ABHISHEK===" - puts @droplet.sandbox + 'lib' geode_modules_tomcat_pattern = /ge.*-tomcat(?[0-9]*).*.jar/.freeze Dir.foreach(@droplet.sandbox + 'lib') do |file| - puts "===DEBUG ABHISHEK===" - puts file if geode_modules_tomcat_pattern.match(file) unless geode_tomcat_version.nil? raise('Multiple versions of geode-modules-tomcat jar found. ' \ @@ -149,8 +145,6 @@ def detect_geode_tomcat_version end geode_tomcat_version = geode_modules_tomcat_pattern.match(file).named_captures['version'] - puts "===DEBUG ABHISHEK===" - puts geode_tomcat_version end end From ae1ea28686b64477218815c0823e3e43c189fe15 Mon Sep 17 00:00:00 2001 From: Abhishek Inani Date: Tue, 12 Mar 2024 20:10:06 +0530 Subject: [PATCH 6/9] Updated geode-modules to gemfire-session-management --- spec/java_buildpack/container/tomcat/tomcat_geode_store_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/java_buildpack/container/tomcat/tomcat_geode_store_spec.rb b/spec/java_buildpack/container/tomcat/tomcat_geode_store_spec.rb index 8463b2315..3e4cd61c9 100644 --- a/spec/java_buildpack/container/tomcat/tomcat_geode_store_spec.rb +++ b/spec/java_buildpack/container/tomcat/tomcat_geode_store_spec.rb @@ -68,7 +68,7 @@ expect(sandbox + 'lib/stub-jar-1.jar').to exist expect(sandbox + 'lib/stub-jar-2.jar').to exist - expect(sandbox + 'lib/geode-modules-tomcat9.jar').to exist + expect(sandbox + 'lib/gemfire-session-management-tomcat9.jar').to exist end it 'mutates context.xml', From cf389e3e35f4e302b6a5dfaa2d5e57e0a0fe5f64 Mon Sep 17 00:00:00 2001 From: Abhishek Inani Date: Wed, 13 Mar 2024 15:20:55 +0530 Subject: [PATCH 7/9] Reverted the geode-module naming --- spec/java_buildpack/container/tomcat/tomcat_geode_store_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/java_buildpack/container/tomcat/tomcat_geode_store_spec.rb b/spec/java_buildpack/container/tomcat/tomcat_geode_store_spec.rb index 3e4cd61c9..8463b2315 100644 --- a/spec/java_buildpack/container/tomcat/tomcat_geode_store_spec.rb +++ b/spec/java_buildpack/container/tomcat/tomcat_geode_store_spec.rb @@ -68,7 +68,7 @@ expect(sandbox + 'lib/stub-jar-1.jar').to exist expect(sandbox + 'lib/stub-jar-2.jar').to exist - expect(sandbox + 'lib/gemfire-session-management-tomcat9.jar').to exist + expect(sandbox + 'lib/geode-modules-tomcat9.jar').to exist end it 'mutates context.xml', From e6b9b859d2f970b5cd0b85d7557034841a3df079 Mon Sep 17 00:00:00 2001 From: Abhishek Inani Date: Wed, 13 Mar 2024 16:58:46 +0530 Subject: [PATCH 8/9] Added session mangement chnage --- spec/java_buildpack/container/tomcat/tomcat_geode_store_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/java_buildpack/container/tomcat/tomcat_geode_store_spec.rb b/spec/java_buildpack/container/tomcat/tomcat_geode_store_spec.rb index 8463b2315..3e4cd61c9 100644 --- a/spec/java_buildpack/container/tomcat/tomcat_geode_store_spec.rb +++ b/spec/java_buildpack/container/tomcat/tomcat_geode_store_spec.rb @@ -68,7 +68,7 @@ expect(sandbox + 'lib/stub-jar-1.jar').to exist expect(sandbox + 'lib/stub-jar-2.jar').to exist - expect(sandbox + 'lib/geode-modules-tomcat9.jar').to exist + expect(sandbox + 'lib/gemfire-session-management-tomcat9.jar').to exist end it 'mutates context.xml', From f3918a2a9d5b89c6463df105ce1d8ded55fa7b2b Mon Sep 17 00:00:00 2001 From: Abhishek Inani Date: Wed, 13 Mar 2024 22:33:40 +0530 Subject: [PATCH 9/9] reverted code for geode --- spec/java_buildpack/container/tomcat/tomcat_geode_store_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/java_buildpack/container/tomcat/tomcat_geode_store_spec.rb b/spec/java_buildpack/container/tomcat/tomcat_geode_store_spec.rb index 3e4cd61c9..8463b2315 100644 --- a/spec/java_buildpack/container/tomcat/tomcat_geode_store_spec.rb +++ b/spec/java_buildpack/container/tomcat/tomcat_geode_store_spec.rb @@ -68,7 +68,7 @@ expect(sandbox + 'lib/stub-jar-1.jar').to exist expect(sandbox + 'lib/stub-jar-2.jar').to exist - expect(sandbox + 'lib/gemfire-session-management-tomcat9.jar').to exist + expect(sandbox + 'lib/geode-modules-tomcat9.jar').to exist end it 'mutates context.xml',