<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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>

    <!-- Use your own parent if this is not a Shibboleth Project artifact. -->
    <parent>
        <groupId>net.shibboleth</groupId>
        <artifactId>parent</artifactId>
        <version>17.0.2</version>
    </parent>

    <groupId>net.shibboleth.idp.plugin.authn</groupId>
    <artifactId>idp-plugin-webauthn-parent</artifactId>
    <version>1.2.0</version>
    <name>Shibboleth IdP :: Plugins :: WebAuthn Login Flow</name>
    <packaging>pom</packaging>
    <description>WebAuthn plugin for the Shibboleth IdP.</description>

    <properties>
        <maven-dist-enforcer-data.version>1.0.15</maven-dist-enforcer-data.version>
        <shibboleth.projectName>java-idp-plugin-webauthn</shibboleth.projectName>
        <okhttp3.mockserver.groupId>com.squareup.okhttp3</okhttp3.mockserver.groupId>
        <okhttp3.mockserver.version>4.9.3</okhttp3.mockserver.version>
        <okhttp3.tls.version>4.9.3</okhttp3.tls.version>
        <idp.groupId>net.shibboleth.idp</idp.groupId>
        <idp.version>5.0.0</idp.version>
        <opensaml.groupId>org.opensaml</opensaml.groupId>
        <opensaml.version>5.0.0</opensaml.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>
        <yubico.groupId>com.yubico</yubico.groupId>
        <yubico-webauthn.version>2.5.4</yubico-webauthn.version>
        <jackson-dataformat-cbor.verison>2.15.3</jackson-dataformat-cbor.verison>
        <com-upokecenter.groupId>com.upokecenter</com-upokecenter.groupId>
        <com-upokecenter.version>4.5.2</com-upokecenter.version>
        <numbers.groupId>com.github.peteroupc</numbers.groupId>
        <numbers.version>1.8.2</numbers.version>
        <checkstyle.configLocation>${project.basedir}/resources/checkstyle/checkstyle.xml</checkstyle.configLocation>
    </properties>

    <modules>
        <module>webauthn-impl</module>
        <module>webauthn-api</module>
        <!-- All DIST modules must come after the -api and -impl modules -->
        <module>webauthn-dist</module>
    </modules>

    <dependencies>
        <!-- Project wide Dependencies -->
        <dependency>
            <groupId>${slf4j.groupId}</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <dependencyManagement>
        <!-- webauthn project dependencies -->
        <dependencies>
            <dependency>
                <groupId>net.shibboleth.idp.plugin.authn</groupId>
                <artifactId>idp-plugin-webauthn-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>net.shibboleth.idp.plugin.authn</groupId>
                <artifactId>idp-plugin-webauthn-impl</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${yubico.groupId}</groupId>
                <artifactId>webauthn-server-attestation</artifactId>
                <version>${yubico-webauthn.version}</version>
            </dependency>
            <dependency>
                <groupId>${yubico.groupId}</groupId>
                <artifactId>webauthn-server-core</artifactId>
                <version>${yubico-webauthn.version}</version>
            </dependency>
            <dependency>
                <groupId>${yubico.groupId}</groupId>
                <artifactId>yubico-util</artifactId>
                <version>${yubico-webauthn.version}</version>
            </dependency>
            <dependency>
                <groupId>${com-upokecenter.groupId}</groupId>
                <artifactId>cbor</artifactId>
                <version>${com-upokecenter.version}</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>${numbers.groupId}</groupId>
                <artifactId>numbers</artifactId>
                <version>${numbers.version}</version>
                <scope>runtime</scope>
            </dependency>
            <!-- Import Dependencies: Shib-Metadata/Attribute/Profile/Shared -->
            <dependency>
                <groupId>${shib-shared.groupId}</groupId>
                <artifactId>shib-shared-bom</artifactId>
                <version>${shib-shared.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>${shib-profile.groupId}</groupId>
                <artifactId>shib-profile-bom</artifactId>
                <version>${shib-profile.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>${shib-attribute.groupId}</groupId>
                <artifactId>shib-attribute-bom</artifactId>
                <version>${shib-attribute.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>${shib-metadata.groupId}</groupId>
                <artifactId>shib-metadata-bom</artifactId>
                <version>${shib-metadata.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!-- Shibboleth IdP BOM for importing IdP dependencies -->
            <dependency>
                <groupId>${idp.groupId}</groupId>
                <artifactId>idp-bom</artifactId>
                <version>${idp.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!-- Opensaml BOM for importing opensaml dependencies -->
            <dependency>
                <groupId>${opensaml.groupId}</groupId>
                <artifactId>opensaml-bom</artifactId>
                <version>${opensaml.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!-- Jackson BOM -->
            <dependency>
                <groupId>com.fasterxml.jackson</groupId>
                <artifactId>jackson-bom</artifactId>
                <version>${jackson.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!-- Test dependencies -->
             <dependency>
                <groupId>${okhttp3.mockserver.groupId}</groupId>
                <artifactId>mockwebserver</artifactId>
                <version>${okhttp3.mockserver.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>${okhttp3.mockserver.groupId}</groupId>
                <artifactId>okhttp-tls</artifactId>
                <version>${okhttp3.tls.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <scm>
        <connection>${shibboleth.scm.connection}${shibboleth.projectName}</connection>
        <developerConnection>${shibboleth.scm.developerConnection}${shibboleth.projectName}</developerConnection>
        <url>${shibboleth.scm.url}${shibboleth.projectName}.git</url>
    </scm> 

    <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>
                    </links>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <index>true</index>
                        <manifestEntries>
                            <Automatic-Module-Name>${automatic.module.name}</Automatic-Module-Name>
                            <Sealed>true</Sealed>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
