<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>net.shibboleth</groupId>
        <artifactId>parent</artifactId>
        <version>17.0.2</version>
    </parent>

    <groupId>net.shibboleth.idp.plugin.authn</groupId>
    <artifactId>idp-plugin-duo-parent</artifactId>
    <version>2.2.2</version>
    <name>Shibboleth IdP :: Plugins :: Duo 2FA Login Flow</name>
    <packaging>pom</packaging>

    <description>
        Duo OIDC based 2FA plugin for the Shibboleth IdP.
    </description>

    <properties>
        <shibboleth.projectName>java-idp-plugin-duo</shibboleth.projectName>
        <idp.groupId>net.shibboleth.idp</idp.groupId>
        <idp.version>5.0.0</idp.version>
        <duo.client.version>1.3.1</duo.client.version>
        <okhttp3.mockserver.version>4.9.3</okhttp3.mockserver.version>
        <okhttp3.tls.version>4.9.3</okhttp3.tls.version>
        <opensaml.groupId>org.opensaml</opensaml.groupId>
        <opensaml.version>5.0.0</opensaml.version>
        <oidc-common.groupId>net.shibboleth.oidc</oidc-common.groupId>
        <oidc-common.version>3.0.1</oidc-common.version>
        <shib-shared.groupId>net.shibboleth</shib-shared.groupId>
        <shib-shared.version>9.0.0</shib-shared.version>
        <shib-profile.groupId>net.shibboleth</shib-profile.groupId>
        <shib-profile.version>5.0.0</shib-profile.version>
        <shib-attribute.groupId>net.shibboleth</shib-attribute.groupId>
        <shib-attribute.version>5.0.0</shib-attribute.version>
        <shib-metadata.groupId>net.shibboleth</shib-metadata.groupId>
        <shib-metadata.version>5.0.0</shib-metadata.version>
        <checkstyle.configLocation>${project.basedir}/resources/checkstyle/checkstyle.xml</checkstyle.configLocation>
        <!-- override enforcer-data for new keys: https://shibboleth.atlassian.net/browse/JDUO-92 -->
        <maven-dist-enforcer-data.version>1.0.17</maven-dist-enforcer-data.version>
    </properties>

    <modules>
        <module>idp-duo-api</module>
        <module>idp-duo-impl</module>
        <module>idp-duo-sdk-client-impl</module>        
        <module>idp-duo-nimbus-client-impl</module>
        <module>idp-duo-nimbus-distribution</module>   
        <module>idp-duo-sdk-distribution</module>     
    </modules>

    <dependencies>
        <!-- Project wide test Dependencies -->
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${slf4j.groupId}</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.openjdk.nashorn</groupId>
            <artifactId>nashorn-core</artifactId>
            <version>${nashorn.jdk.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <!-- IdP BOM when importing IdP dependencies -->
            <dependency>
                <groupId>net.shibboleth.idp</groupId>
                <artifactId>idp-bom</artifactId>
                <version>${idp.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!-- OIDC Common BOM when importing OIDC dependencies -->
            <dependency>
                <groupId>${oidc-common.groupId}</groupId>
                <artifactId>oidc-common-bom</artifactId>
                <version>${oidc-common.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>         
            <!-- Duo client and plugin dependencies -->
            <dependency>
                <groupId>com.duosecurity</groupId>
                <artifactId>duo-universal-sdk</artifactId>
                <version>${duo.client.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>idp-plugin-duo-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <!-- test dependencies -->
            <dependency>
                <groupId>com.squareup.okhttp3</groupId>
                <artifactId>mockwebserver</artifactId>
                <version>${okhttp3.mockserver.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.squareup.okhttp3</groupId>
                <artifactId>okhttp-tls</artifactId>
                <version>${okhttp3.tls.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>net.shibboleth.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <links combine.children="append">
                        <link>${javadoc.url}/java-shib-shared/${shib-shared.version}</link>
                        <link>${javadoc.url}/java-opensaml/${opensaml.version}</link>
                        <link>${javadoc.url}/java-shib-metadata/${shib-metadata.version}</link>
                        <link>${javadoc.url}/java-shib-attribute/${shib-attribute.version}</link>
                        <link>${javadoc.url}/java-shib-profile/${shib-profile.version}</link>
                        <link>${javadoc.url}/java-identity-provider/${idp.version}</link>
                        <link>${javadoc.url}/java-oidc-common/${oidc-common.version}</link>
                    </links>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Automatic-Module-Name>${automatic.module.name}</Automatic-Module-Name>
                            <Implementation-Title>${project.artifactId}</Implementation-Title>
                            <Implementation-Version>${project.version}</Implementation-Version>
                            <Implementation-Vendor>shibboleth.net</Implementation-Vendor>
                            <Sealed>true</Sealed>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>

    

</project>
