<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>11.2.1</version>
    </parent>

    <groupId>net.shibboleth.idp.plugin.authn</groupId>
    <artifactId>idp-plugin-duo-parent</artifactId>
    <version>1.1.0</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>
        <idp.groupId>net.shibboleth.idp</idp.groupId>
        <idp.version>4.1.1</idp.version>
        <duo.client.version>1.1.1</duo.client.version>
        <opensaml.groupId>org.opensaml</opensaml.groupId>
        <opensaml.version>4.1.0</opensaml.version>
        <java-support.version>8.2.0</java-support.version>      
        <oidc.common.version>1.1.0</oidc.common.version>
        <checkstyle.configLocation>${project.basedir}/checkstyle.xml</checkstyle.configLocation>
    </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>

    <distributionManagement>
        <site>
            <id>site</id>
            <url>dav:${shibboleth.site.url}java-idp-plugin-duo/${project.version}/</url>
        </site>
    </distributionManagement>
    
    <scm>
        <connection>scm:git:https://git.shibboleth.net/git/java-${project.artifactId}</connection>
        <developerConnection>scm:git:git@git.shibboleth.net:java-${project.artifactId}</developerConnection>
        <url>https://git.shibboleth.net/view/?p=java-${project.artifactId}.git</url>
    </scm>

    <repositories>
        <repository>
            <id>shib-release</id>
            <url>https://build.shibboleth.net/nexus/content/groups/public</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>shib-snapshot</id>
            <url>https://build.shibboleth.net/nexus/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>


    <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>
    </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>net.shibboleth.oidc</groupId>
                <artifactId>oidc-common-bom</artifactId>
                <version>${oidc.common.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!-- Provided support dependencies -->
            <dependency>
                <groupId>net.shibboleth.utilities</groupId>
                <artifactId>java-support</artifactId>
                <version>${java-support.version}</version>
                <scope>provided</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>net.shibboleth.idp.plugin.authn</groupId>
                <artifactId>idp-plugin-duo-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <!-- test bom dependencies -->
            <dependency>
                <groupId>${idp.groupId}</groupId>
                <artifactId>idp-tests-bom</artifactId>
                <version>${idp.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

	<build>
		<plugins>
			<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>
