From f28695acc6ed4fb449408978aa52cb29504cf0e2 Mon Sep 17 00:00:00 2001 From: Thomas Schreiber Date: Fri, 15 Sep 2023 10:46:40 +0200 Subject: [PATCH] upgrade tomcat and servlet version --- RMBTControlServer/build.gradle | 2 +- .../src/at/rtr/rmbt/controlServer/ContextListener.java | 4 ++-- RMBTMapServer/build.gradle | 1 - RMBTSharedCode/build.gradle | 2 +- .../src/at/rtr/rmbt/shared/cache/CacheContextListener.java | 4 ++-- RMBTStatisticServer/build.gradle | 2 +- .../src/at/rtr/rmbt/statisticServer/ContextListener.java | 4 ++-- common.gradle | 4 ++-- 8 files changed, 11 insertions(+), 12 deletions(-) diff --git a/RMBTControlServer/build.gradle b/RMBTControlServer/build.gradle index 1c736dfc..fbab308c 100644 --- a/RMBTControlServer/build.gradle +++ b/RMBTControlServer/build.gradle @@ -40,7 +40,7 @@ def generatedContextXmlFile = file("${buildDir}/context.xml") dependencies { providedCompile "org.apache.tomcat:tomcat-catalina:$catalinaVersion" - providedCompile "javax.servlet:javax.servlet-api:$servletVersion" + compileOnly group: 'jakarta.servlet', name: 'jakarta.servlet-api', version: "$servletVersion" implementation('commons-io:commons-io:2.4', "org.json:json:$jsonVersion", "org.restlet.jse:org.restlet.ext.json:${restletVersion}", diff --git a/RMBTControlServer/src/at/rtr/rmbt/controlServer/ContextListener.java b/RMBTControlServer/src/at/rtr/rmbt/controlServer/ContextListener.java index b58ebaa4..b14d2fa5 100644 --- a/RMBTControlServer/src/at/rtr/rmbt/controlServer/ContextListener.java +++ b/RMBTControlServer/src/at/rtr/rmbt/controlServer/ContextListener.java @@ -27,8 +27,8 @@ import java.util.concurrent.TimeUnit; import javax.naming.NamingException; -import javax.servlet.ServletContextEvent; -import javax.servlet.ServletContextListener; +import jakarta.servlet.ServletContextEvent; +import jakarta.servlet.ServletContextListener; import at.rtr.rmbt.db.DbConnection; import at.rtr.rmbt.shared.GeoIPHelper; diff --git a/RMBTMapServer/build.gradle b/RMBTMapServer/build.gradle index 13620db3..ce8fb331 100644 --- a/RMBTMapServer/build.gradle +++ b/RMBTMapServer/build.gradle @@ -33,7 +33,6 @@ subprojects{ dependencies { providedCompile "org.apache.tomcat:tomcat-catalina:$catalinaVersion" - providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version: "$servletVersion" implementation "org.json:json:$jsonVersion" implementation "org.restlet.jse:org.restlet.ext.json:$restletVersion" implementation "org.restlet.jee:org.restlet.ext.servlet:$restletVersion" diff --git a/RMBTSharedCode/build.gradle b/RMBTSharedCode/build.gradle index 1293ff15..9af45941 100644 --- a/RMBTSharedCode/build.gradle +++ b/RMBTSharedCode/build.gradle @@ -25,7 +25,7 @@ dependencies { testImplementation group: 'junit', name: 'junit', version: '4.11' implementation group: 'org.postgresql', name: 'postgresql', version: '42.2.18' implementation group: 'com.google.guava', name: 'guava', version: "$guavaVersion" - providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version: "$servletVersion" + compileOnly group: 'jakarta.servlet', name: 'jakarta.servlet-api', version: "$servletVersion" implementation "org.json:json:$jsonVersion" implementation group: 'com.google.code.gson', name: 'gson', version: "$gsonVersion" implementation group: 'com.github.jknack', name: 'handlebars', version: '4.1.2' diff --git a/RMBTSharedCode/src/at/rtr/rmbt/shared/cache/CacheContextListener.java b/RMBTSharedCode/src/at/rtr/rmbt/shared/cache/CacheContextListener.java index d0af1d8d..9d79232b 100644 --- a/RMBTSharedCode/src/at/rtr/rmbt/shared/cache/CacheContextListener.java +++ b/RMBTSharedCode/src/at/rtr/rmbt/shared/cache/CacheContextListener.java @@ -16,8 +16,8 @@ *******************************************************************************/ package at.rtr.rmbt.shared.cache; -import javax.servlet.ServletContextEvent; -import javax.servlet.ServletContextListener; +import jakarta.servlet.ServletContextEvent; +import jakarta.servlet.ServletContextListener; public class CacheContextListener implements ServletContextListener { diff --git a/RMBTStatisticServer/build.gradle b/RMBTStatisticServer/build.gradle index 11795ef5..7a2ed08c 100644 --- a/RMBTStatisticServer/build.gradle +++ b/RMBTStatisticServer/build.gradle @@ -53,7 +53,7 @@ def generatedContextXmlFile = file("${buildDir}/context.xml") dependencies { providedCompile "org.apache.tomcat:tomcat-catalina:$catalinaVersion" - providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version: "$servletVersion" + compileOnly group: 'jakarta.servlet', name: 'jakarta.servlet-api', version: "$servletVersion" testImplementation group: 'junit', name: 'junit', version: '4.12' testImplementation 'org.mockito:mockito-core:2.7.17' implementation "org.restlet.jse:org.restlet:$restletVersion" diff --git a/RMBTStatisticServer/src/at/rtr/rmbt/statisticServer/ContextListener.java b/RMBTStatisticServer/src/at/rtr/rmbt/statisticServer/ContextListener.java index c04b9684..43f1aa15 100644 --- a/RMBTStatisticServer/src/at/rtr/rmbt/statisticServer/ContextListener.java +++ b/RMBTStatisticServer/src/at/rtr/rmbt/statisticServer/ContextListener.java @@ -36,8 +36,8 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.logging.Logger; -import javax.servlet.ServletContextEvent; -import javax.servlet.ServletContextListener; +import jakarta.servlet.ServletContextEvent; +import jakarta.servlet.ServletContextListener; import at.rtr.rmbt.shared.RevisionHelper; diff --git a/common.gradle b/common.gradle index 764fc514..c384b3b5 100644 --- a/common.gradle +++ b/common.gradle @@ -3,9 +3,9 @@ // ext { restletVersion = '2.4.3' - servletVersion = '3.1.0' + servletVersion = '5.0.0' jacksonVersion = '2.14.2' - catalinaVersion = '7.0.109' + catalinaVersion = '10.1.13' jsonVersion = '20220924' javaMelodyVersion = '1.91.0' dbUtilsVersion = '1.7'