You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by Alex Orlov via user <us...@shiro.apache.org> on 2023/02/01 09:51:21 UTC

How to use Shiro 1.11.0 with jakarta namespace?

Hello,
 
As I understand it is possible to use Shiro 1.11.0 with jakarta.servlet.
 
To use Shiro (with JPMS!) I have to the following maven dependency:
 
<dependency>
                <groupId>org.apache.shiro</groupId>
                <artifactId>shiro-all</artifactId>
                <version>1.11.0</version>
<dependency>
 
However, it seems to use javax.servlet namespace. Could anyone say how I can use Shiro with jakarta.sevlet?
 
--
Best regards, Alex Orlov

Re: How to use Shiro 1.11.0 with jakarta namespace?

Posted by Francois Papon <fr...@openobject.fr>.
Hello Alex,

You need to use the jakarta classifier in the dependency definition:

         <dependency>
             <groupId>org.apache.shiro</groupId>
             <artifactId>shiro-core</artifactId>
             <classifier>jakarta</classifier>
             <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.shiro</groupId>
             <artifactId>shiro-web</artifactId>
             <classifier>jakarta</classifier>
             <version>${project.version}</version>
             <exclusions>
                 <exclusion>
<groupId>org.apache.shiro</groupId>
                     <artifactId>*</artifactId>
                 </exclusion>
             </exclusions>
         </dependency>

The shiro-all artifact should not be used anymore as it's deprecated and 
not contains jakarta.

You can find a sample in the project source code:

https://github.com/apache/shiro/tree/main/samples/web-jakarta

regards,

François

On 01/02/2023 10:51, Alex Orlov via user wrote:
> Hello,
> As I understand it is possible to use Shiro 1.11.0 with jakarta.servlet.
> To use Shiro (with JPMS!) I have to the following maven dependency:
> <dependency>
> <groupId>org.apache.shiro</groupId>
> <artifactId>shiro-all</artifactId>
>                 <version>1.11.0</version>
> <dependency>
> However, it seems to use javax.servlet namespace. Could anyone say how 
> I can use Shiro with jakarta.sevlet?
> --
> Best regards, Alex Orlov