Closed tfr42 closed 9 months ago
The Tomcat Migration Guide describes the requirements which need to be met. There is the Tomcat Migration Tool for Jakarta EE to support the migration of an existing WAR file. How to run the tool is document in here.
Steps for migrating to TC 10.x using Apache Maven 3.9+ with OpenJDK 17:
main
main
mvn clean install
java -jar jakartaee-migration-1.0.7-shaded.jar $PWD/deegree-services/deegree-webservices/target/deegree-webservices-${DEEGREE_VERSION}.war $PWD/deegree-services/deegree-webservices/target/deegree-webservices.war
docker run -it --rm -v "$PWD"/deegree-services/deegree-webservices/target/deegree-webservices.war:/usr/local/tomcat/webapps/deegree-webservices.war -v "$HOME"/.deegree:/root/.deegree -p 8080:8080 tomcat:10.1.12-jdk17
A docker image with deegree webservices 3.5.2 on Tomcat 10.1 with JDK 17 is available for testing on hub.docker.com:
docker pull tfr42/deegree:3.5-jdk17-tomcat10
The docker image was successfully tested locally.
The tests included:
Source code migration to jakarta.*
with:
mvn -U org.openrewrite.maven:rewrite-maven-plugin:run \
-Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-migrate-java:LATEST \
-Drewrite.activeRecipes=org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta
The PR #1627 contains the upgrade to Servlet API 6.0 and Faces 4.0 as well as upgrade of #1625.
Part of the migration to Servlet API 6.0 is a update of the Jetty maven plugin required. The maven plugin is used to run the integration-tests in a servlet container. The plugin has the following constraints:
To use Faces 4.0 with CDI on Tomcat 10.1 it is required to enable CDI, see https://tomcat.apache.org/tomcat-10.1-doc/cdi.html for more information.
The support of Servlet API version 5.0 (TC 10.0) and 6.0 (TC 10.1) was fully implemented with version 3.6 of deegree webservices, see https://github.com/deegree/deegree3/wiki/End-of-Life-and-Support-Matrix for more information.
To support Servlet API version 5.0 (TC 10.0) and 6.0 (TC 10.1) it is required to change the
javax.servlet.*
imports in the code byjakarta.servlet.*
.