This is an automated email from the ASF dual-hosted git repository.

lprimak pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/shiro.git

commit 2e83661ac0a1f29ef1525bf84ecb0069611819ad
Author: Rui Ventura <[email protected]>
AuthorDate: Mon Jan 19 11:51:51 2026 -0800

    chore(3.x): Migrate to jakarta EE 10 using OpenRewrite (#2224)
    
    * chore(3.x): Migrate to jakarta EE 10 using OpenRewrite
    
    * chore(3.x): Remove the jakarta classifier from shiro artifacts
    
    * chore(3.x): Address checkstyle issues post-migration
    
    * chore(3.x): Remove `HttpSessionContext` references
    
    * chore(3.x): Remove duplicate jakarta jax-rs imports
    
    * chore(3.x): Temporarily disable some modules/samples
    
    * Revert "chore(3.x): Temporarily disable some modules/samples"
    
    This reverts commit 71de7ba83716ebd006405b5ddeee6eda894014b9.
    
    ---------
    
    Co-authored-by: lprimak <[email protected]>
---
 .../samples/guice/SampleShiroGuiceBootstrap.java   |  4 ++--
 .../samples/guice/SampleShiroServletModule.java    |  4 ++--
 .../guice3/src/main/webapp/WEB-INF/web.xml         |  6 ++---
 .../samples/guice/SampleShiroGuiceBootstrap.java   |  4 ++--
 .../samples/guice/SampleShiroServletModule.java    |  4 ++--
 .../guice4/src/main/webapp/WEB-INF/web.xml         |  6 ++---
 .../web-jakarta/src/main/webapp/WEB-INF/web.xml    |  6 ++---
 .../services/javax.enterprise.inject.spi.Extension | 18 --------------
 .../apache/shiro/ee/util/JakartaTransformer.java   |  2 +-
 .../services/javax.enterprise.inject.spi.Extension | 18 --------------
 .../shiro/spring/web/ShiroUrlPathHelper.java       |  2 +-
 .../shiro/web/servlet/HttpSessionContext.java      | 28 ----------------------
 12 files changed, 19 insertions(+), 83 deletions(-)

diff --git 
a/integration-tests/guice3/src/main/java/org/apache/shiro/samples/guice/SampleShiroGuiceBootstrap.java
 
b/integration-tests/guice3/src/main/java/org/apache/shiro/samples/guice/SampleShiroGuiceBootstrap.java
index ea9926f07..f884aefc0 100644
--- 
a/integration-tests/guice3/src/main/java/org/apache/shiro/samples/guice/SampleShiroGuiceBootstrap.java
+++ 
b/integration-tests/guice3/src/main/java/org/apache/shiro/samples/guice/SampleShiroGuiceBootstrap.java
@@ -23,8 +23,8 @@ import com.google.inject.Injector;
 import com.google.inject.servlet.GuiceServletContextListener;
 import org.apache.shiro.guice.web.ShiroWebModule;
 
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextEvent;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletContextEvent;
 
 public class SampleShiroGuiceBootstrap extends GuiceServletContextListener {
 
diff --git 
a/integration-tests/guice3/src/main/java/org/apache/shiro/samples/guice/SampleShiroServletModule.java
 
b/integration-tests/guice3/src/main/java/org/apache/shiro/samples/guice/SampleShiroServletModule.java
index 2003537de..007f9e472 100644
--- 
a/integration-tests/guice3/src/main/java/org/apache/shiro/samples/guice/SampleShiroServletModule.java
+++ 
b/integration-tests/guice3/src/main/java/org/apache/shiro/samples/guice/SampleShiroServletModule.java
@@ -30,8 +30,8 @@ import org.apache.shiro.web.mgt.CookieRememberMeManager;
 import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
 import org.apache.shiro.web.mgt.WebSecurityManager;
 
-import javax.inject.Singleton;
-import javax.servlet.ServletContext;
+import jakarta.inject.Singleton;
+import jakarta.servlet.ServletContext;
 import java.net.MalformedURLException;
 import java.net.URL;
 
diff --git a/integration-tests/guice3/src/main/webapp/WEB-INF/web.xml 
b/integration-tests/guice3/src/main/webapp/WEB-INF/web.xml
index b158ae40f..64681aec7 100644
--- a/integration-tests/guice3/src/main/webapp/WEB-INF/web.xml
+++ b/integration-tests/guice3/src/main/webapp/WEB-INF/web.xml
@@ -17,10 +17,10 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee";
+<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee";
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd";
-         version="3.1">
+         xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee 
https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd";
+         version="6.0">
 
     <listener>
         
<listener-class>org.apache.shiro.samples.guice.SampleShiroGuiceBootstrap</listener-class>
diff --git 
a/integration-tests/guice4/src/main/java/org/apache/shiro/samples/guice/SampleShiroGuiceBootstrap.java
 
b/integration-tests/guice4/src/main/java/org/apache/shiro/samples/guice/SampleShiroGuiceBootstrap.java
index ea9926f07..f884aefc0 100644
--- 
a/integration-tests/guice4/src/main/java/org/apache/shiro/samples/guice/SampleShiroGuiceBootstrap.java
+++ 
b/integration-tests/guice4/src/main/java/org/apache/shiro/samples/guice/SampleShiroGuiceBootstrap.java
@@ -23,8 +23,8 @@ import com.google.inject.Injector;
 import com.google.inject.servlet.GuiceServletContextListener;
 import org.apache.shiro.guice.web.ShiroWebModule;
 
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextEvent;
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletContextEvent;
 
 public class SampleShiroGuiceBootstrap extends GuiceServletContextListener {
 
diff --git 
a/integration-tests/guice4/src/main/java/org/apache/shiro/samples/guice/SampleShiroServletModule.java
 
b/integration-tests/guice4/src/main/java/org/apache/shiro/samples/guice/SampleShiroServletModule.java
index 48c714fb8..5b6dca73f 100644
--- 
a/integration-tests/guice4/src/main/java/org/apache/shiro/samples/guice/SampleShiroServletModule.java
+++ 
b/integration-tests/guice4/src/main/java/org/apache/shiro/samples/guice/SampleShiroServletModule.java
@@ -30,8 +30,8 @@ import org.apache.shiro.web.mgt.CookieRememberMeManager;
 import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
 import org.apache.shiro.web.mgt.WebSecurityManager;
 
-import javax.inject.Singleton;
-import javax.servlet.ServletContext;
+import jakarta.inject.Singleton;
+import jakarta.servlet.ServletContext;
 import java.net.MalformedURLException;
 import java.net.URL;
 
diff --git a/integration-tests/guice4/src/main/webapp/WEB-INF/web.xml 
b/integration-tests/guice4/src/main/webapp/WEB-INF/web.xml
index b158ae40f..64681aec7 100644
--- a/integration-tests/guice4/src/main/webapp/WEB-INF/web.xml
+++ b/integration-tests/guice4/src/main/webapp/WEB-INF/web.xml
@@ -17,10 +17,10 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee";
+<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee";
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd";
-         version="3.1">
+         xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee 
https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd";
+         version="6.0">
 
     <listener>
         
<listener-class>org.apache.shiro.samples.guice.SampleShiroGuiceBootstrap</listener-class>
diff --git a/samples/web-jakarta/src/main/webapp/WEB-INF/web.xml 
b/samples/web-jakarta/src/main/webapp/WEB-INF/web.xml
index 65295aa87..a3c09ecd4 100644
--- a/samples/web-jakarta/src/main/webapp/WEB-INF/web.xml
+++ b/samples/web-jakarta/src/main/webapp/WEB-INF/web.xml
@@ -17,10 +17,10 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee";
+<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee";
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd";
-         version="4.0">
+         xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee 
https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd";
+         version="6.0">
 
     <listener>
         
<listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
diff --git 
a/support/cdi/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
 
b/support/cdi/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
deleted file mode 100644
index ea8874ce5..000000000
--- 
a/support/cdi/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
+++ /dev/null
@@ -1,18 +0,0 @@
-## Licensed to the Apache Software Foundation (ASF) under one
-## or more contributor license agreements.  See the NOTICE file
-## distributed with this work for additional information
-## regarding copyright ownership.  The ASF licenses this file
-## to you under the Apache License, Version 2.0 (the
-## "License"); you may not use this file except in compliance
-## with the License.  You may obtain a copy of the License at
-##
-##     http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing,
-## software distributed under the License is distributed on an
-## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-## KIND, either express or implied.  See the License for the
-## specific language governing permissions and limitations
-## under the License.
-
-org.apache.shiro.cdi.ShiroSecurityExtension
diff --git 
a/support/jakarta-ee/src/main/java/org/apache/shiro/ee/util/JakartaTransformer.java
 
b/support/jakarta-ee/src/main/java/org/apache/shiro/ee/util/JakartaTransformer.java
index a89259bd6..8e7a0a6f9 100644
--- 
a/support/jakarta-ee/src/main/java/org/apache/shiro/ee/util/JakartaTransformer.java
+++ 
b/support/jakarta-ee/src/main/java/org/apache/shiro/ee/util/JakartaTransformer.java
@@ -14,7 +14,7 @@
 package org.apache.shiro.ee.util;
 
 import java.util.regex.Pattern;
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
 
 import lombok.AccessLevel;
 import lombok.Getter;
diff --git 
a/support/jakarta-ee/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
 
b/support/jakarta-ee/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
deleted file mode 100644
index d34a2a7ee..000000000
--- 
a/support/jakarta-ee/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
+++ /dev/null
@@ -1,18 +0,0 @@
-## Licensed to the Apache Software Foundation (ASF) under one
-## or more contributor license agreements.  See the NOTICE file
-## distributed with this work for additional information
-## regarding copyright ownership.  The ASF licenses this file
-## to you under the Apache License, Version 2.0 (the
-## "License"); you may not use this file except in compliance
-## with the License.  You may obtain a copy of the License at
-##
-##     http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing,
-## software distributed under the License is distributed on an
-## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-## KIND, either express or implied.  See the License for the
-## specific language governing permissions and limitations
-## under the License.
-
-org.apache.shiro.ee.cdi.ShiroSessionScopeExtension
diff --git 
a/support/spring/src/main/java/org/apache/shiro/spring/web/ShiroUrlPathHelper.java
 
b/support/spring/src/main/java/org/apache/shiro/spring/web/ShiroUrlPathHelper.java
index b54a6eae3..ecce70f7d 100644
--- 
a/support/spring/src/main/java/org/apache/shiro/spring/web/ShiroUrlPathHelper.java
+++ 
b/support/spring/src/main/java/org/apache/shiro/spring/web/ShiroUrlPathHelper.java
@@ -21,7 +21,7 @@ package org.apache.shiro.spring.web;
 import org.apache.shiro.web.util.WebUtils;
 import org.springframework.web.util.UrlPathHelper;
 
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
 
 /**
  * A Spring UrlPathHelper that uses Shiro's path resolution logic.
diff --git 
a/web/src/main/java/org/apache/shiro/web/servlet/HttpSessionContext.java 
b/web/src/main/java/org/apache/shiro/web/servlet/HttpSessionContext.java
deleted file mode 100644
index 6942b7a28..000000000
--- a/web/src/main/java/org/apache/shiro/web/servlet/HttpSessionContext.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.shiro.web.servlet;
-
-/**
- * Shim for interface that no longer exists in Jakarta EE,
- * but still exists in Java EE
- */
-@Deprecated
-public interface HttpSessionContext {
-
-}

Reply via email to