<?xml version="1.0" encoding="UTF-8"?>
<!-- vi: set et smarttab sw=4 tabstop=4: -->
<!--
Copyright © 2017 Brocade Communications Systems and others. All rights reserved.

This program and the accompanying materials are made available under the
terms of the Eclipse Public License v1.0 which accompanies this distribution,
and is available at http://www.eclipse.org/legal/epl-v10.html
-->
<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>

    <parent>
        <groupId>org.opendaylight.aaa</groupId>
        <artifactId>aaa-parent</artifactId>
        <version>0.20.13</version>
        <relativePath>../../parent</relativePath>
    </parent>

    <artifactId>aaa-shiro</artifactId>
    <name>ODL :: aaa :: ${project.artifactId}</name>
    <packaging>bundle</packaging>

    <dependencies>
        <dependency>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-annotations</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.aaa</groupId>
            <artifactId>aaa-authn-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.aaa</groupId>
            <artifactId>aaa-shiro-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.aaa</groupId>
            <artifactId>aaa-tokenauthrealm</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.aaa</groupId>
            <artifactId>aaa-idm-store-h2</artifactId>
        </dependency>

        <dependency>
            <groupId>org.opendaylight.aaa</groupId>
            <artifactId>aaa-cert</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.aaa</groupId>
            <artifactId>repackaged-shiro</artifactId>
        </dependency>

        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
        </dependency>

        <!--Yang Binding -->
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-binding-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.aaa</groupId>
            <artifactId>aaa-filterchain</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.aaa</groupId>
            <artifactId>aaa-password-service-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.service.component.annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.service.http.whiteboard</artifactId>
        </dependency>
        <dependency>
            <groupId>jakarta.annotation</groupId>
            <artifactId>jakarta.annotation-api</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.guicedee.services</groupId>
            <artifactId>javax.inject</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jolokia</groupId>
            <artifactId>jolokia-osgi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.aaa.web</groupId>
            <artifactId>web-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.aaa.web</groupId>
            <artifactId>servlet-api</artifactId>
        </dependency>

        <!-- Testing Dependencies -->
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.inject</groupId>
            <artifactId>jersey-hk2</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.test-framework.providers</groupId>
            <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.aaa</groupId>
            <artifactId>aaa-password-service-impl</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
                        <Export-Package>
                            org.opendaylight.aaa,
                            org.opendaylight.aaa.shiro,
                            org.opendaylight.aaa.shiro.idm,
                            org.opendaylight.aaa.shiro,
                            org.opendaylight.aaa.shiro.filters,
                            org.opendaylight.aaa.shiro.realm,
                            <!-- TODO: This is temporary until we can find a better spot for GsonProvider. -->
                            org.opendaylight.aaa.provider,
                            org.opendaylight.aaa.shiro.web.env
                        </Export-Package>
                        <Import-Package>
                           !javax.annotation,
                           *
                        </Import-Package>

                        <!-- FIXME: AAA-205: remove this block -->
                        <Provide-Capability>
                            osgi.service;objectClass:List&lt;String&gt;="javax.servlet.Servlet";uses:="javax.servlet",
                            osgi.service;objectClass:List&lt;String&gt;="org.jolokia.osgi.security.Authenticator";uses:="org.jolokia.osgi.security",
                            osgi.service;objectClass:List&lt;String&gt;="org.opendaylight.aaa.api.ClaimCache,org.opendaylight.aaa.api.CredentialAuth,org.opendaylight.aaa.api.IdMService,org.opendaylight.aaa.api.PasswordCredentialAuth";uses:="org.opendaylight.aaa.api,org.opendaylight.aaa.api,org.opendaylight.aaa.api,org.opendaylight.aaa.api",
                            osgi.service;objectClass:List&lt;String&gt;="org.opendaylight.aaa.web.WebContextSecurer";uses:="org.opendaylight.aaa.web"
                            osgi.service;objectClass:List&lt;String&gt;="org.opendaylight.aaa.shiro.web.env.AAAShiroWebEnvironment";uses:="org.opendaylight.aaa.shiro.web.env",
                        </Provide-Capability>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-artifacts</id>
                        <phase>package</phase>
                        <goals>
                            <goal>attach-artifact</goal>
                        </goals>
                        <configuration>
                            <artifacts>
                                <!-- attach idmtool as an artifact -->
                                <artifact>
                                    <file>${project.build.directory}/classes/idmtool.py</file>
                                    <type>py</type>
                                    <classifier>idmtool</classifier>
                                </artifact>
                                <!-- attach aaa-app-config.xml as an artifact -->
                                <artifact>
                                    <file>${project.build.directory}/classes/initial/aaa-app-config.xml</file>
                                    <type>xml</type>
                                    <classifier>aaa-app-config</classifier>
                                </artifact>
                                <artifact>
                                    <file>${project.build.directory}/classes/initial/aaa-datastore-config.xml</file>
                                    <type>xml</type>
                                    <classifier>aaa-datastore-config</classifier>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
