<?xml version="1.0" encoding="UTF-8"?>
<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>
        <artifactId>authservice</artifactId>
        <groupId>no.priv.bang.authservice</groupId>
        <version>3.0.15</version>
    </parent>

    <artifactId>authservice.web.security</artifactId>

    <name>Authentication webapp web whiteboard Shiro filter</name>

    <properties>
        <karaf-feature-name>authservice-web-security</karaf-feature-name>
    </properties>

    <dependencies>
        <dependency>
            <groupId>no.priv.bang.authservice</groupId>
            <artifactId>authservice.web.security.memorysession</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>no.priv.bang.authservice</groupId>
            <artifactId>authservice.web.security.dbrealm</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>no.priv.bang.authservice</groupId>
            <artifactId>authservice.web.security.shirofilter</artifactId>
        </dependency>
        <dependency>
            <groupId>no.priv.bang.karaf</groupId>
            <artifactId>karaf.liquibase.runner</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>no.priv.bang.authservice</groupId>
            <artifactId>authservice.db.liquibase</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>no.priv.bang.authservice</groupId>
            <artifactId>authservice.db.liquibase.test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>no.priv.bang.authservice</groupId>
            <artifactId>authservice.definitions</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.web</groupId>
            <artifactId>pax-web-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.web</groupId>
            <artifactId>pax-web-extender-whiteboard</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-web</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.mockrunner</groupId>
            <artifactId>mockrunner-servlet</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>osgi.core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.service.component.annotations</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>no.priv.bang.osgiservice</groupId>
            <artifactId>osgiservice.users</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>no.priv.bang.osgiservice</groupId>
            <artifactId>osgiservice.users</artifactId>
            <type>xml</type>
            <classifier>features</classifier>
        </dependency>
        <dependency>
            <groupId>no.priv.bang.osgi.service.adapters</groupId>
            <artifactId>service-mocks</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.service.jdbc</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.jdbc</groupId>
            <artifactId>pax-jdbc-pool-common</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.jdbc</groupId>
            <artifactId>pax-jdbc-derby</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derby</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.liquibase</groupId>
            <artifactId>liquibase-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>no.priv.bang.servlet</groupId>
            <artifactId>servlet.jersey</artifactId>
            <type>xml</type>
            <classifier>features</classifier>
        </dependency>
        <dependency>
            <groupId>no.priv.bang.servlet</groupId>
            <artifactId>servlet.jersey</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.inject</groupId>
            <artifactId>jersey-hk2</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.containers</groupId>
            <artifactId>jersey-container-servlet</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jsoup</groupId>
            <artifactId>jsoup</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.media</groupId>
            <artifactId>jersey-media-json-jackson</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>no.priv.bang.osgi.service.adapters</groupId>
            <artifactId>adapters.logservice</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <instructions>
                        <Import-Package>*,org.apache.shiro.web.filter.authc</Import-Package> <!-- import of package containing PassThruAuthenticationFilter for the Shiro INI parser -->
                        <Export-Package>!*</Export-Package>
                        <Include-Resource>
                            /=target/classes/,
                            /open-iconic/font/css/open-iconic-bootstrap.min.css=target/dependency/META-INF/resources/webjars/open-iconic/${open-iconic.version}/font/css/open-iconic-bootstrap.min.css,
                            /open-iconic/font/fonts/open-iconic.woff=target/dependency/META-INF/resources/webjars/open-iconic/${open-iconic.version}/font/fonts/open-iconic.woff
                        </Include-Resource>
                        <_removeheaders>
                            Include-Resource,
                            Private-Package,
                            Embed-Dependency,
                            Embed-Transitive
                        </_removeheaders>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>karaf-maven-plugin</artifactId>
                <configuration>
                    <includeTransitiveDependency>true</includeTransitiveDependency>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.webjars.bower</groupId>
                                    <artifactId>open-iconic</artifactId>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.5.0</version>
                <executions>
                    <execution>
                        <id>copy-openiconic-for-test</id>
                        <goals>
                            <goal>testResources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${basedir}/target/test-classes/open-iconic</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>${basedir}/target/dependency/META-INF/resources/webjars/open-iconic/1.1.1</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
