<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
/**
 * Copyright (c) Codice Foundation
 *
 * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either
 * version 3 of the License, or any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public License is distributed along with this program and can be found at
 * <http://www.gnu.org/licenses/lgpl.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>
        <artifactId>platform-security</artifactId>
        <groupId>ddf.platform.security</groupId>
        <version>2.29.32</version>
    </parent>
    <groupId>ddf.security.jaas</groupId>
    <artifactId>security-jaas-ldap</artifactId>
    <name>DDF :: Security :: JAAS :: LDAP</name>
    <packaging>bundle</packaging>
    <build>
        <plugins>
            <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>
                                <artifact>
                                    <file>src/main/resources/default-ldaplogin.config</file>
                                    <type>config</type>
                                    <classifier>default-ldaplogin</classifier>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Embed-Dependency>
                            opendj-core,
                            opendj-grizzly,
                            forgerock-util,
                            grizzly-framework,
                            i18n-slf4j,
                            i18n-core,
                            org.apache.karaf.util,
                            org.apache.felix.utils
                        </Embed-Dependency>
                        <Import-Package>
                            !android.os,
                            sun.net.util;resolution:=optional,
                            org.osgi.service.blueprint,
                            org.osgi.framework,
                            javax.security.auth.callback,
                            javax.security.auth.login,
                            javax.net.ssl,
                            javax.naming,
                            org.apache.karaf.jaas.config,
                            org.apache.karaf.jaas.modules,
                            ddf.security.common.audit,
                            ddf.security.encryption,
                            org.codice.ddf.configuration,
                            org.slf4j,
                            *
                        </Import-Package>
                        <Private-Package>
                            org.apache.karaf.jaas.config.impl
                        </Private-Package>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>check-artifact-size</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <ArtifactSizeEnforcerRule implementation="org.codice.maven.artifactsize.ArtifactSizeEnforcerRule">
                                    <maxArtifactSize>2.8_MB</maxArtifactSize>
                                </ArtifactSizeEnforcerRule>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-check</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <haltOnFailure>true</haltOnFailure>
                            <rules>
                                <rule>
                                    <element>BUNDLE</element>
                                    <limits>
                                        <limit implementation="org.codice.jacoco.LenientLimit">
                                            <counter>INSTRUCTION</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0.7</minimum>
                                        </limit>
                                        <limit implementation="org.codice.jacoco.LenientLimit">
                                            <counter>BRANCH</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0.35</minimum>
                                        </limit>
                                        <limit implementation="org.codice.jacoco.LenientLimit">
                                            <counter>COMPLEXITY</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0.5</minimum>
                                        </limit>
                                    </limits>
                                </rule>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.apache.karaf.jaas</groupId>
            <artifactId>org.apache.karaf.jaas.modules</artifactId>
            <version>${karaf.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.jaas</groupId>
            <artifactId>org.apache.karaf.jaas.boot</artifactId>
            <version>${karaf.version}</version>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>osgi.core</artifactId>
        </dependency>
        <dependency>
            <groupId>ddf.security.encryption</groupId>
            <artifactId>security-encryption-api</artifactId>
        </dependency>
        <dependency>
            <groupId>ddf.security.core</groupId>
            <artifactId>security-core-api</artifactId>
        </dependency>
        <dependency>
            <groupId>ddf.security.core</groupId>
            <artifactId>security-core-impl</artifactId>
        </dependency>
        <dependency>
            <groupId>ddf.platform</groupId>
            <artifactId>platform-configuration</artifactId>
        </dependency>
        <dependency>
            <groupId>org.forgerock.opendj</groupId>
            <artifactId>opendj-core</artifactId>
            <version>3.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.forgerock.opendj</groupId>
            <artifactId>opendj-grizzly</artifactId>
            <version>3.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.forgerock.commons</groupId>
            <artifactId>forgerock-util</artifactId>
            <version>3.0.2</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.grizzly</groupId>
            <artifactId>grizzly-framework</artifactId>
            <version>2.3.30</version>
        </dependency>
        <dependency>
            <groupId>org.forgerock.commons</groupId>
            <artifactId>i18n-slf4j</artifactId>
            <version>1.4.2</version>
        </dependency>
        <dependency>
            <groupId>org.forgerock.commons</groupId>
            <artifactId>i18n-core</artifactId>
            <version>1.4.2</version>
        </dependency>
        <dependency>
            <groupId>com.github.stefanbirkner</groupId>
            <artifactId>system-rules</artifactId>
            <version>1.16.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.jaas</groupId>
            <artifactId>org.apache.karaf.jaas.config</artifactId>
            <version>${karaf.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf</groupId>
            <artifactId>org.apache.karaf.util</artifactId>
            <version>${karaf.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.utils</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>ddf.security.encryption</groupId>
            <artifactId>security-encryption-impl</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.unboundid</groupId>
            <artifactId>unboundid-ldapsdk</artifactId>
            <version>4.0.14</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-pool2</artifactId>
            <version>2.5.0</version>
        </dependency>
    </dependencies>
</project>
