diff --git a/.github/workflows/tds.yml b/.github/workflows/tds.yml
index ad73beea37..fb8615c3ec 100644
--- a/.github/workflows/tds.yml
+++ b/.github/workflows/tds.yml
@@ -8,8 +8,7 @@ jobs:
matrix:
java-version: [ 17 ]
java-vendor: [ 'temurin' ]
- # test against tomcat 8.5.x and tomcat 9.x
- servletcontainer: [ 'tomcat85', 'tomcat9' ]
+ servletcontainer: [ 'tomcat10' ]
steps:
- uses: actions/checkout@v4
- name: Build and test with Gradle (${{ matrix.java-vendor }} ${{ matrix.java-version }})
diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/DapController.java b/dap4/d4servlet/src/main/java/dap4/servlet/DapController.java
index f72b36925f..022aa683a0 100644
--- a/dap4/d4servlet/src/main/java/dap4/servlet/DapController.java
+++ b/dap4/d4servlet/src/main/java/dap4/servlet/DapController.java
@@ -11,9 +11,9 @@
import dap4.core.dmr.*;
import dap4.core.util.*;
import dap4.dap4lib.*;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServlet;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
import java.io.*;
import java.net.MalformedURLException;
import java.nio.ByteOrder;
diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/DapDSR.java b/dap4/d4servlet/src/main/java/dap4/servlet/DapDSR.java
index 2447c8bb5e..d6774abc35 100644
--- a/dap4/d4servlet/src/main/java/dap4/servlet/DapDSR.java
+++ b/dap4/d4servlet/src/main/java/dap4/servlet/DapDSR.java
@@ -9,7 +9,7 @@
import dap4.dap4lib.DapProtocol;
import dap4.dap4lib.RequestMode;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletResponse;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
diff --git a/dap4/d4servlet/src/main/java/dap4/servlet/DapRequest.java b/dap4/d4servlet/src/main/java/dap4/servlet/DapRequest.java
index 811e7a0958..e752110801 100644
--- a/dap4/d4servlet/src/main/java/dap4/servlet/DapRequest.java
+++ b/dap4/d4servlet/src/main/java/dap4/servlet/DapRequest.java
@@ -7,8 +7,8 @@
import dap4.core.util.*;
import dap4.dap4lib.RequestMode;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URISyntaxException;
diff --git a/dap4/d4ts/build.gradle b/dap4/d4ts/build.gradle
index b20cf3aaf3..33bde22377 100644
--- a/dap4/d4ts/build.gradle
+++ b/dap4/d4ts/build.gradle
@@ -8,12 +8,12 @@ dependencies {
implementation 'edu.ucar:dap4'
implementation project(":dap4:d4servlet")
- providedCompile "jakarta.servlet:jakarta.servlet-api:${depVersion.javaxServletApi}"
+ providedCompile "jakarta.servlet:jakarta.servlet-api:${depVersion.jakartaServletApi}"
compileOnly 'org.slf4j:slf4j-api'
runtimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl'
- runtimeOnly 'org.apache.logging.log4j:log4j-web'
+ runtimeOnly 'org.apache.logging.log4j:log4j-jakarta-web'
compileOnly 'org.slf4j:slf4j-api'
}
diff --git a/dap4/d4ts/src/main/java/dap4/d4ts/D4TSServlet.java b/dap4/d4ts/src/main/java/dap4/d4ts/D4TSServlet.java
index 59ae59c7c1..6cbbcb0273 100644
--- a/dap4/d4ts/src/main/java/dap4/d4ts/D4TSServlet.java
+++ b/dap4/d4ts/src/main/java/dap4/d4ts/D4TSServlet.java
@@ -12,9 +12,9 @@
import dap4.dap4lib.DapLog;
import dap4.servlet.*;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
diff --git a/dap4/d4ts/src/main/java/dap4/d4ts/FrontPage.java b/dap4/d4ts/src/main/java/dap4/d4ts/FrontPage.java
index 322620282d..11cfb87d4b 100644
--- a/dap4/d4ts/src/main/java/dap4/d4ts/FrontPage.java
+++ b/dap4/d4ts/src/main/java/dap4/d4ts/FrontPage.java
@@ -11,8 +11,8 @@
import dap4.dap4lib.DapLog;
import dap4.servlet.DapRequest;
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.http.HttpServletResponse;
import java.io.*;
import java.net.MalformedURLException;
import java.net.URL;
diff --git a/dap4/d4ts/src/main/java/dap4/d4ts/HttpHeadFilter.java b/dap4/d4ts/src/main/java/dap4/d4ts/HttpHeadFilter.java
index 49bb7659c0..3acbe07f90 100644
--- a/dap4/d4ts/src/main/java/dap4/d4ts/HttpHeadFilter.java
+++ b/dap4/d4ts/src/main/java/dap4/d4ts/HttpHeadFilter.java
@@ -12,11 +12,11 @@
*/
package dap4.d4ts;
-import javax.servlet.*;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletRequestWrapper;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpServletResponseWrapper;
+import jakarta.servlet.*;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequestWrapper;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletResponseWrapper;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
diff --git a/docs/userguide/src/site/_config.yml b/docs/userguide/src/site/_config.yml
index 869bcc9e9f..7e438cc4d0 100644
--- a/docs/userguide/src/site/_config.yml
+++ b/docs/userguide/src/site/_config.yml
@@ -78,4 +78,4 @@ docset_name: userguide
netcdf-java_docset_version: 5.6
# this will appear in various doc pages
-tomcat_version: 9.0
+tomcat_version: 10.1
diff --git a/docs/userguide/src/site/pages/tds_tutorial/getting_started/InstallJavaTomcat.md b/docs/userguide/src/site/pages/tds_tutorial/getting_started/InstallJavaTomcat.md
index 1135d27998..6eb6d8cf5f 100644
--- a/docs/userguide/src/site/pages/tds_tutorial/getting_started/InstallJavaTomcat.md
+++ b/docs/userguide/src/site/pages/tds_tutorial/getting_started/InstallJavaTomcat.md
@@ -15,7 +15,7 @@ Users of OS-provided packages via package management systems for Java and/or Tom
## System Requirements
* OpenJDK Java 17
-* Apache Tomcat 8.x or 9.x
+* Apache Tomcat 10.x
While there are different distributors of Java and servlet containers, Unidata develops, uses and tests the THREDDS Data Server using _OpenJDK Java_ and the _Apache Tomcat_ servlet container.
@@ -83,12 +83,12 @@ The following example shows Tomcat installation on a linux system.
The installation is performed as the `root` user.
{% include note.html content="
-For installation of Tomcat on Windows, see the [Tomcat Setup Guide](http://tomcat.apache.org/tomcat-8.5-doc/setup.html#Windows){:target='_blank'}.
+For installation of Tomcat on Windows, see the [Tomcat Setup Guide](http://tomcat.apache.org/tomcat-10.1-doc/setup.html#Windows){:target='_blank'}.
" %}
-1. [Download](http://tomcat.apache.org/download-80.cgi){:target="_blank"} current version of the Tomcat 8.5 servlet container.
+1. [Download](https://tomcat.apache.org/download-10.cgi){:target="_blank"} current version of the Tomcat servlet container.
-2. Install Tomcat as per the Apache Tomcat [installation instructions](http://tomcat.apache.org/tomcat-8.5-doc/setup.html){:target="_blank"}.
+2. Install Tomcat as per the Apache Tomcat [installation instructions](http://tomcat.apache.org/tomcat-10.1-doc/setup.html){:target="_blank"}.
Copy the binary tar.gz file into the installation directory (`/usr/local` in this example):
@@ -96,18 +96,18 @@ For installation of Tomcat on Windows, see the [Tomcat Setup Guide](http://tomca
# pwd
/usr/local
- # cp /tmp/apache-tomcat-8.5.34.tar.gz .
+ # cp /tmp/apache-tomcat-xx.tar.gz .
# ls -l
total 196676
- -rw-r--r-- 1 root root 9625824 Oct 24 13:27 apache-tomcat-8.5.34.tar.gz
+ -rw-r--r-- 1 root root 9625824 Oct 24 13:27 apache-tomcat-xx.tar.gz
drwxr-xr-x 7 root root 4096 Oct 6 07:58 jdk-xx
~~~
Unpack the archive file:
~~~bash
- # tar xvfz apache-tomcat-8.5.34.tar.gz
+ # tar xvfz apache-tomcat-xx.tar.gz
~~~
This will create a Tomcat directory:
@@ -115,18 +115,18 @@ For installation of Tomcat on Windows, see the [Tomcat Setup Guide](http://tomca
~~~bash
# ls -l
total 196680
- drwxr-xr-x 9 root root 4096 Oct 24 13:29 apache-tomcat-8.5.34
- -rw-r--r-- 1 root root 9625824 Oct 24 13:27 apache-tomcat-8.5.34.tar.gz
+ drwxr-xr-x 9 root root 4096 Oct 24 13:29 apache-tomcat-xx
+ -rw-r--r-- 1 root root 9625824 Oct 24 13:27 apache-tomcat-xx.tar.gz
drwxr-xr-x 7 root root 4096 Oct 6 07:58 jdk-xx
~~~
Remove the remaining binary `tar.gz` file when the installation is complete.
~~~bash
- # rm apache-tomcat-8.5.34.tar.gz
+ # rm apache-tomcat-xx.tar.gz
# ls -l
total 187282
- drwxr-xr-x 9 root root 4096 Oct 24 13:29 apache-tomcat-8.5.34
+ drwxr-xr-x 9 root root 4096 Oct 24 13:29 apache-tomcat-xx
drwxr-xr-x 7 root root 4096 Oct 6 07:58 jdk-xx
~~~
@@ -148,12 +148,12 @@ Windows users can consult the [Microsoft Documentation](https://docs.microsoft.c
# pwd
/usr/local
- # ln -s apache-tomcat-8.5.34 tomcat
+ # ln -s apache-tomcat-xx tomcat
# ln -s jdk-xx jdk
# ls -l
total 196684
- drwxr-xr-x 9 root root 4096 Oct 24 13:29 tomcat -> apache-tomcat-8.5.34
- drwxr-xr-x 9 root root 4096 Oct 24 13:29 apache-tomcat-8.5.34
+ drwxr-xr-x 9 root root 4096 Oct 24 13:29 tomcat -> apache-tomcat-xx
+ drwxr-xr-x 9 root root 4096 Oct 24 13:29 apache-tomcat-xx
lrwxrwxrwx 1 root root 12 Oct 24 13:59 jdk -> jdk-xx
drwxr-xr-x 7 root root 4096 Oct 6 07:58 jdk-xx
~~~
diff --git a/gradle/any/gretty.gradle b/gradle/any/gretty.gradle
index a31a4bce80..7fe072a638 100644
--- a/gradle/any/gretty.gradle
+++ b/gradle/any/gretty.gradle
@@ -33,10 +33,9 @@ repositories {
}
// allow servlet container to be configured by setting a system property
-// default to tomcat 8.5.x
def servletContainerName = System.getProperty('tds.test.gretty.container')
if (servletContainerName == null || servletContainerName.isEmpty()) {
- servletContainerName = 'tomcat85'
+ servletContainerName = 'tomcat10'
}
import org.akhikhl.gretty.AppBeforeIntegrationTestTask
@@ -53,23 +52,6 @@ gretty {
// We want to modify Gretty tasks but they won't be added to the project until after evaluation:
// http://goo.gl/qlFXTD. So, our modifications must also occur after evaluation.
afterEvaluate {
- // Change the log directory of all tasks that start a server.
- // Due to a bug, the normal instanceof operator won't work here. Nor will tasks.withType().
- tasks.matching {
- GradleUtils.instanceOf(it, AppStartTask.name)
- }.each {
- // LauncherConfig is only meant to be retrieved during the execution phase, hence the doFirst{}.
- // If we try to grab it during evaluation, we get:
- // Error opening zip file or JAR manifest missing :
- // build/tmp/expandedArchives/org.jacoco.agent-0.7.7.201606060606.jar_aj7uwwfluzmrbfb6clshgf6du/jacocoagent.jar
- it.doFirst {
- // tomcatBaseDir is the working directory for embedded tomcat. We want to write our logs there as well.
- File tomcatBaseDir = it.launcherConfig.baseDir
-
- // Will be something like: "$projectDir/build/serverBaseDir_tomcat8/logs".
- it.logDir = file("$tomcatBaseDir/logs").absolutePath
- }
- }
// These enable HTTPS authentication, which is needed to access the TDS admin interface.
httpsEnabled = true
@@ -97,10 +79,3 @@ gretty {
}
}
}
-
-configurations.runtimeClasspath {
- // When gretty uses tomcat 9, javax.servlet-api gets added to the runtimeClasspath of the projects
- // to which the plugin is applied. This makes sure we exclude it, which keeps it from getting included
- // with our war artifacts.
- exclude group: 'javax.servlet', module: 'javax.servlet-api'
-}
diff --git a/gradle/any/java-internal.gradle b/gradle/any/java-internal.gradle
index 1c8417783f..056d2f5dd0 100644
--- a/gradle/any/java-internal.gradle
+++ b/gradle/any/java-internal.gradle
@@ -9,6 +9,7 @@ java {
// Will apply to "compileJava", "compileTestJava", "compileSourceSetJava", etc.
tasks.withType(JavaCompile).all {
options.encoding = 'UTF-8'
+ options.compilerArgs.add("-parameters")
// show deprecation details
//options.compilerArgs = ['-Xlint:deprecation']
diff --git a/gradle/any/properties.gradle b/gradle/any/properties.gradle
index d3d56b1558..363d9dbaed 100644
--- a/gradle/any/properties.gradle
+++ b/gradle/any/properties.gradle
@@ -55,6 +55,7 @@ ext {
ext {
jvmArguments = [
+ '--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED',
'--add-exports', 'java.base/jdk.internal.ref=ALL-UNNAMED',
'--add-exports', 'java.base/sun.nio.ch=ALL-UNNAMED',
'--add-exports', 'jdk.unsupported/sun.misc=ALL-UNNAMED',
diff --git a/gradle/any/shared-mvn-coords.gradle b/gradle/any/shared-mvn-coords.gradle
index 70047bc50e..55a1841ed7 100644
--- a/gradle/any/shared-mvn-coords.gradle
+++ b/gradle/any/shared-mvn-coords.gradle
@@ -5,7 +5,7 @@ ext {
// plugin version management
buildPlugins = [:]
- buildPlugins.gretty = 'org.gretty:gretty:3.0.9'
+ buildPlugins.gretty = 'org.gretty:gretty:4.1.5'
buildPlugins.shadow = 'gradle.plugin.com.github.johnrengelman:shadow:7.1.2'
buildPlugins.sonarqube = 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.0'
buildPlugins.spotless = 'com.diffplug.spotless:spotless-plugin-gradle:4.5.1'
@@ -25,9 +25,11 @@ ext {
depVersion.jaxen = '1.1.6'
depVersion.netcdfJava = '5.6.1-SNAPSHOT'
// gradle seems to have issues with the compileOnly configuration, so we need to provide the full maven
- // coordinates for javax.servlet-api if the gradle plugin in applied. If we don't, we see errors like this:
- depVersion.javaxServletApi = '4.0.3'
- depVersion.hibernateValidator = '6.2.5.Final'
+ // coordinates for jakarta.servlet-api if the gradle plugin in applied. If we don't, we see errors like this:
+ depVersion.jakartaServletApi = '5.0.0'
+ // Spring 6.x servlet mocks require servlet 6 though it can test 5 code
+ depVersion.testJakartaServletApi = '6.0.0'
+ depVersion.hibernateValidator = '7.0.0.Final'
// TODO: figure out way to keep this version in sync with netcdf-java version
// It is included in the netcdf-java-bom (via netcdf-java-platform), but we can't
// reference that version in a gradle build script (see gradle/any/protobuf.gradle)
diff --git a/gradle/gretty/log4j2Config.xml b/gradle/gretty/log4j2Config.xml
deleted file mode 100644
index 6a26008fef..0000000000
--- a/gradle/gretty/log4j2Config.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/gradle/gretty/logback.xml b/gradle/gretty/logback.xml
deleted file mode 100644
index 791f303e3c..0000000000
--- a/gradle/gretty/logback.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
- %highlight([%d{HH:mm:ss.SSS} %-5level %logger{36}]) %message%n
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/opendap/dtswar/build.gradle b/opendap/dtswar/build.gradle
index 9abbafd6f3..c939c590f2 100644
--- a/opendap/dtswar/build.gradle
+++ b/opendap/dtswar/build.gradle
@@ -14,12 +14,12 @@ dependencies {
implementation 'org.jdom:jdom2'
implementation 'org.slf4j:slf4j-api'
- providedCompile "jakarta.servlet:jakarta.servlet-api:${depVersion.javaxServletApi}"
+ providedCompile "jakarta.servlet:jakarta.servlet-api:${depVersion.jakartaServletApi}"
runtimeOnly 'org.apache.taglibs:taglibs-standard-spec'
runtimeOnly 'org.apache.taglibs:taglibs-standard-impl'
runtimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl'
- runtimeOnly 'org.apache.logging.log4j:log4j-web'
+ runtimeOnly 'org.apache.logging.log4j:log4j-jakarta-web'
}
diff --git a/opendap/dtswar/src/main/java/opendap/dts/DTSServlet.java b/opendap/dtswar/src/main/java/opendap/dts/DTSServlet.java
index 0e06747c9b..c767a9bdff 100644
--- a/opendap/dtswar/src/main/java/opendap/dts/DTSServlet.java
+++ b/opendap/dtswar/src/main/java/opendap/dts/DTSServlet.java
@@ -51,12 +51,12 @@
import opendap.util.Debug;
import org.apache.http.HttpStatus;
import ucar.nc2.util.EscapeStrings;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletOutputStream;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
import java.io.*;
import java.util.*;
import java.nio.charset.StandardCharsets;
@@ -73,7 +73,7 @@
* reduce the bulk of this file, many of these methods have been
* in wrapper classes in this package (opendap.servlet).
*
- * This code relies on the javax.servlet.ServletConfig
+ * This code relies on the jakarta.servlet.ServletConfig
* interface (in particular the getInitParameter() method)
* to record detailed configuration information used by
* the servlet and it's children.
@@ -135,7 +135,7 @@
* types.
*
* Configuration:
- * The AbstractServlet relies on the javax.servlet.ServletConfig
+ * The AbstractServlet relies on the jakarta.servlet.ServletConfig
* interface (in particular the getInitParameter() method)
* to retrieve configuration information used by the servlet.
* InitParameters:
diff --git a/opendap/server/src/main/java/opendap/servlet/AbstractServlet.java b/opendap/server/src/main/java/opendap/servlet/AbstractServlet.java
index 03dbb21b3e..63ee49ebb9 100644
--- a/opendap/server/src/main/java/opendap/servlet/AbstractServlet.java
+++ b/opendap/server/src/main/java/opendap/servlet/AbstractServlet.java
@@ -44,8 +44,8 @@
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.zip.DeflaterOutputStream;
-import javax.servlet.*;
-import javax.servlet.http.*;
+import jakarta.servlet.*;
+import jakarta.servlet.http.*;
import opendap.dap.*;
import opendap.servers.*;
import opendap.dap.parsers.ParseException;
@@ -69,7 +69,7 @@
* be where the server specific OPeNDAP server data types are
* used via their associated class factory.
*
- * This code relies on the javax.servlet.ServletConfig
+ * This code relies on the jakarta.servlet.ServletConfig
* interface (in particular the getInitParameter() method)
* to record detailed configuration information used by
* the servlet and it's children.
@@ -126,7 +126,7 @@
*/
-public abstract class AbstractServlet extends javax.servlet.http.HttpServlet {
+public abstract class AbstractServlet extends jakarta.servlet.http.HttpServlet {
//////////////////////////////////////////////////
// Statics
diff --git a/opendap/server/src/main/java/opendap/servlet/ReqState.java b/opendap/server/src/main/java/opendap/servlet/ReqState.java
index fcc105b42e..f2cefcd1a5 100644
--- a/opendap/server/src/main/java/opendap/servlet/ReqState.java
+++ b/opendap/server/src/main/java/opendap/servlet/ReqState.java
@@ -43,10 +43,10 @@
import opendap.dap.DAP2Exception;
import ucar.httpservices.HTTPUtil;
import ucar.unidata.util.StringUtil2;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.ServletConfig;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
/**
* User requests get cached here so that downstream code can access
diff --git a/tdcommon/src/main/java/thredds/server/catalog/tracker/DatasetExtBytesMarshaller.java b/tdcommon/src/main/java/thredds/server/catalog/tracker/DatasetExtBytesMarshaller.java
index 4839800134..2909338d7e 100644
--- a/tdcommon/src/main/java/thredds/server/catalog/tracker/DatasetExtBytesMarshaller.java
+++ b/tdcommon/src/main/java/thredds/server/catalog/tracker/DatasetExtBytesMarshaller.java
@@ -5,7 +5,7 @@
import net.openhft.chronicle.core.util.ReadResolvable;
import net.openhft.chronicle.hash.serialization.BytesReader;
import net.openhft.chronicle.hash.serialization.BytesWriter;
-import javax.validation.constraints.NotNull;
+import jakarta.validation.constraints.NotNull;
import javax.annotation.Nullable;
public class DatasetExtBytesMarshaller
diff --git a/tds-platform/build.gradle b/tds-platform/build.gradle
index 633cb0afff..246dcb1af7 100644
--- a/tds-platform/build.gradle
+++ b/tds-platform/build.gradle
@@ -14,11 +14,16 @@ dependencies {
// If there is a conflict (previously hidden by optimistic resolution), we should get an error when we build, and
// at that point we can take things on a case-by-case basis.
api enforcedPlatform("edu.ucar:netcdf-java-bom:${depVersion.netcdfJava}")
- api enforcedPlatform('org.springframework:spring-framework-bom:5.3.39')
- api enforcedPlatform('org.springframework.security:spring-security-bom:5.7.12')
+ api enforcedPlatform('org.springframework:spring-framework-bom:6.1.12')
+ api enforcedPlatform('org.springframework.security:spring-security-bom:6.3.1')
api platform('net.openhft:chronicle-bom:2.25ea62')
api enforcedPlatform("org.apache.logging.log4j:log4j-bom:2.17.1")
- api enforcedPlatform("jakarta.platform:jakarta.jakartaee-bom:8.0.0")
+ // remove log4j-jakarta-web and use log4j-jakarta-bom when that is released
+ api platform("org.apache.logging.log4j:log4j-jakarta-web:2.23.1") {
+ // Use version from edal-java for h2database
+ exclude group: 'com.h2database', module: 'h2'
+ }
+ api enforcedPlatform("jakarta.platform:jakarta.jakartaee-bom:9.0.0")
constraints {
@@ -72,6 +77,8 @@ dependencies {
// opendap
api 'edu.ucar:opendap'
api "jakarta.servlet:jakarta.servlet-api"
+ api "jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:2.0.0"
+ api "org.glassfish.web:jakarta.servlet.jsp.jstl:2.0.0"
runtime 'org.apache.taglibs:taglibs-standard-spec:1.2.5'
runtime 'org.apache.taglibs:taglibs-standard-impl:1.2.5'
@@ -79,18 +86,18 @@ dependencies {
runtime 'edu.ucar:dap4'
// defined in tds-testing-platform as well, but using api config
- runtime 'org.apache.logging.log4j:log4j-web'
+ runtime 'org.apache.logging.log4j:log4j-jakarta-web'
// tds
api 'org.json:json:20231013'
api 'com.coverity.security:coverity-escapers:1.1.1'
- api 'org.thymeleaf:thymeleaf-spring5:3.1.2.RELEASE'
+ api 'org.thymeleaf:thymeleaf-spring6:3.1.2.RELEASE'
api 'jakarta.validation:jakarta.validation-api'
api "org.hibernate.validator:hibernate-validator:${depVersion.hibernateValidator}"
api "org.hibernate.validator:hibernate-validator-annotation-processor:${depVersion.hibernateValidator}"
api 'jakarta.el:jakarta.el-api'
api'org.apache.commons:commons-lang3:3.4'
- runtime 'org.glassfish:javax.el:3.0.0'
+ runtime 'org.glassfish:jakarta.el:4.0.2'
runtime "jaxen:jaxen:${depVersion.jaxen}"
// waterml stuff
@@ -99,7 +106,7 @@ dependencies {
api 'org.n52.sensorweb:52n-xml-om-v20'
// edal-java (ncwms)
- def edalVersion = '1.5.2.0'
+ def edalVersion = '1.5.2.1-SNAPSHOT'
api "uk.ac.rdg.resc:edal-common:${edalVersion}"
api "uk.ac.rdg.resc:edal-cdm:${edalVersion}"
api "uk.ac.rdg.resc:edal-wms:${edalVersion}"
diff --git a/tds-testing-platform/build.gradle b/tds-testing-platform/build.gradle
index fefd54b9e5..ae0e275304 100644
--- a/tds-testing-platform/build.gradle
+++ b/tds-testing-platform/build.gradle
@@ -15,14 +15,11 @@ dependencies {
constraints {
// Spring
- // Spring-test v5.3.4 introduced a hard dependency on servlet api v4.
- // That will be rolled back in v5.4.5, so for now, we specifically ask for
- // spring-test 5.3.3.
- api 'org.springframework:spring-test:5.3.32'
+ api 'org.springframework:spring-test'
// dap4
// defined in tds-platform as well, but using runtime config
- api 'org.apache.logging.log4j:log4j-web' // api because of :dap4:d4tests)
+ api 'org.apache.logging.log4j:log4j-jakarta-web' // api because of :dap4:d4tests)
// tds
api "jaxen:jaxen:${depVersion.jaxen}" // api because of XPath operations in mock tests
diff --git a/tds/build.gradle b/tds/build.gradle
index 68c111ccc9..c1145704b7 100644
--- a/tds/build.gradle
+++ b/tds/build.gradle
@@ -38,7 +38,9 @@ dependencies {
implementation project(':dap4:d4servlet')
// Server stuff
- providedCompile "jakarta.servlet:jakarta.servlet-api:${depVersion.javaxServletApi}"
+ providedCompile "jakarta.servlet:jakarta.servlet-api:${depVersion.jakartaServletApi}"
+ runtimeOnly "jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api"
+ runtimeOnly "org.glassfish.web:jakarta.servlet.jsp.jstl"
runtimeOnly 'org.apache.taglibs:taglibs-standard-spec'
runtimeOnly 'org.apache.taglibs:taglibs-standard-impl'
@@ -85,16 +87,16 @@ dependencies {
// JSR 303 with Hibernate Validator, which is dragging in jboss logging
runtimeOnly 'org.hibernate.validator:hibernate-validator'
- runtimeOnly 'org.glassfish:javax.el'
+ runtimeOnly 'org.glassfish:jakarta.el'
annotationProcessor "org.hibernate.validator:hibernate-validator-annotation-processor:${depVersion.hibernateValidator}"
// @Resource annotation (removed post Java 8)
implementation 'jakarta.annotation:jakarta.annotation-api'
- implementation 'org.thymeleaf:thymeleaf-spring5'
+ implementation 'org.thymeleaf:thymeleaf-spring6'
// Testing
- testImplementation "jakarta.servlet:jakarta.servlet-api:${depVersion.javaxServletApi}"
+ testImplementation "jakarta.servlet:jakarta.servlet-api:${depVersion.jakartaServletApi}"
testImplementation 'org.springframework:spring-test'
testImplementation 'org.hamcrest:hamcrest-core'
testImplementation 'commons-io:commons-io'
@@ -109,7 +111,7 @@ dependencies {
// Logging
implementation 'org.slf4j:slf4j-api'
runtimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl'
- runtimeOnly 'org.apache.logging.log4j:log4j-web'
+ runtimeOnly 'org.apache.logging.log4j:log4j-jakarta-web'
testRuntimeOnly 'ch.qos.logback:logback-classic'
// This is for freshInstallTest
@@ -122,6 +124,12 @@ configurations.testRuntimeOnly {
exclude group: 'org.apache.logging.log4j'
}
+configurations.testRuntimeClasspath {
+ resolutionStrategy {
+ force "jakarta.servlet:jakarta.servlet-api:${depVersion.testJakartaServletApi}"
+ }
+}
+
task copyWebappFilesForTests(type: Copy) {
// Tests expect for certain webapp files to be accessible from the classpath (e.g. WEB-INF/applicationContext.xml).
from 'src/main/webapp'
diff --git a/tds/src/integrationTests/java/opendap/test/TestNcmlWithOpendap.java b/tds/src/integrationTests/java/opendap/test/TestNcmlWithOpendap.java
index e6d2742b09..3f7c44d83d 100644
--- a/tds/src/integrationTests/java/opendap/test/TestNcmlWithOpendap.java
+++ b/tds/src/integrationTests/java/opendap/test/TestNcmlWithOpendap.java
@@ -7,7 +7,7 @@
import java.nio.charset.StandardCharsets;
import java.text.DecimalFormat;
import java.util.Arrays;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletResponse;
import org.junit.Test;
import thredds.test.util.TestOnLocalServer;
import ucar.ma2.Array;
diff --git a/tds/src/integrationTests/java/thredds/server/fileserver/TestFileServer.java b/tds/src/integrationTests/java/thredds/server/fileserver/TestFileServer.java
index b8d46deec1..a5607fe1b1 100644
--- a/tds/src/integrationTests/java/thredds/server/fileserver/TestFileServer.java
+++ b/tds/src/integrationTests/java/thredds/server/fileserver/TestFileServer.java
@@ -8,7 +8,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.util.Optional;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletResponse;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
diff --git a/tds/src/integrationTests/java/thredds/server/fileserver/TestPartialContent.java b/tds/src/integrationTests/java/thredds/server/fileserver/TestPartialContent.java
index c22383d2b9..6e5af08bb6 100644
--- a/tds/src/integrationTests/java/thredds/server/fileserver/TestPartialContent.java
+++ b/tds/src/integrationTests/java/thredds/server/fileserver/TestPartialContent.java
@@ -5,7 +5,7 @@
import java.lang.invoke.MethodHandles;
import java.util.ArrayList;
import java.util.List;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletResponse;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
diff --git a/tds/src/integrationTests/java/thredds/server/ncss/NcssGridIntegrationTest.java b/tds/src/integrationTests/java/thredds/server/ncss/NcssGridIntegrationTest.java
index 41b4fe54ad..e38779eead 100644
--- a/tds/src/integrationTests/java/thredds/server/ncss/NcssGridIntegrationTest.java
+++ b/tds/src/integrationTests/java/thredds/server/ncss/NcssGridIntegrationTest.java
@@ -6,7 +6,7 @@
package thredds.server.ncss;
import java.util.Optional;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletResponse;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;
diff --git a/tds/src/integrationTests/java/thredds/server/ncss/TestNcssGridWithSwappedDimensions.java b/tds/src/integrationTests/java/thredds/server/ncss/TestNcssGridWithSwappedDimensions.java
index b239d940cd..36df252d97 100644
--- a/tds/src/integrationTests/java/thredds/server/ncss/TestNcssGridWithSwappedDimensions.java
+++ b/tds/src/integrationTests/java/thredds/server/ncss/TestNcssGridWithSwappedDimensions.java
@@ -5,7 +5,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletResponse;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
diff --git a/tds/src/integrationTests/java/thredds/server/notebook/TestNotebookServices.java b/tds/src/integrationTests/java/thredds/server/notebook/TestNotebookServices.java
index 4f84f3626e..83c7aa8152 100644
--- a/tds/src/integrationTests/java/thredds/server/notebook/TestNotebookServices.java
+++ b/tds/src/integrationTests/java/thredds/server/notebook/TestNotebookServices.java
@@ -3,7 +3,7 @@
import static com.google.common.truth.Truth.assertThat;
import java.nio.charset.StandardCharsets;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletResponse;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import thredds.test.util.TestOnLocalServer;
diff --git a/tds/src/integrationTests/java/thredds/server/services/TestAdminDebug.java b/tds/src/integrationTests/java/thredds/server/services/TestAdminDebug.java
index 6376bbc0a8..faddc9b314 100644
--- a/tds/src/integrationTests/java/thredds/server/services/TestAdminDebug.java
+++ b/tds/src/integrationTests/java/thredds/server/services/TestAdminDebug.java
@@ -37,7 +37,8 @@ public static List