<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ 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.
  -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <artifactId>shiro-jakarta-ee</artifactId>
    <name>Apache Shiro :: Support :: Jakarta EE</name>
    <description>Apache Shiro - Jakarta EE Integration</description>
    <packaging>jar</packaging>

    <parent>
        <groupId>org.apache.shiro</groupId>
        <artifactId>shiro-support</artifactId>
        <version>2.1.0</version>
    </parent>

    <properties>
        <module.name>jakarta.ee</module.name>
        <jacoco.skip>true</jacoco.skip>
    </properties>

    <dependencies>
        <dependency>
            <groupId>jakarta.platform</groupId>
            <artifactId>jakarta.jakartaee-api</artifactId>
            <version>8.0.0</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-jaxrs</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-cdi</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.omnifaces</groupId>
            <artifactId>omnifaces</artifactId>
            <version>3.14.12</version>
        </dependency>
        <dependency>
            <groupId>org.jsoup</groupId>
            <artifactId>jsoup</artifactId>
            <version>1.22.1</version>
        </dependency>

        <!-- Test Dependencies -->
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-jdk14</artifactId>
            <version>${slf4j.version}</version>
            <scope>test</scope>
            <optional>true</optional>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <annotationProcessorPaths>
                        <annotationProcessorPath>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                            <version>${lombok.version}</version>
                        </annotationProcessorPath>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>org.apache.shiro.ee</Bundle-SymbolicName>
                        <Export-Package>org.apache.shiro.ee*;version=${project.version}</Export-Package>
                        <Import-Package>
                            org.apache.shiro*;version="${shiro.osgi.importRange}",
                            *
                        </Import-Package>
                        <_removeheaders>Bnd-LastModified</_removeheaders>
                        <_reproducible>true</_reproducible>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <configuration>
                    <relocations combine.children="append">
                        <relocation>
                            <pattern>javax.faces</pattern>
                            <shadedPattern>jakarta.faces</shadedPattern>
                        </relocation>
                        <relocation>
                            <pattern>javax.el</pattern>
                            <shadedPattern>jakarta.el</shadedPattern>
                        </relocation>
                        <relocation>
                            <pattern>javax.interceptor</pattern>
                            <shadedPattern>jakarta.interceptor</shadedPattern>
                        </relocation>
                        <relocation>
                            <pattern>javax.activation</pattern>
                            <shadedPattern>jakarta.activation</shadedPattern>
                        </relocation>
                        <relocation>
                            <pattern>window.jsf</pattern>
                            <shadedPattern>window.faces</shadedPattern>
                        </relocation>
                        <relocation>
                            <pattern>jsf.ajax</pattern>
                            <shadedPattern>faces.ajax</shadedPattern>
                        </relocation>
                    </relocations>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>
