<?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>
    <parent>
        <groupId>net.shibboleth</groupId>
        <artifactId>parent</artifactId>
        <version>11.3.5</version>
    </parent>
    <groupId>net.shibboleth.idp.plugin.authn</groupId>
    <artifactId>idp-plugin-oidc-rp-parent</artifactId>
    <version>1.0.0</version>
    <name>Shibboleth IdP :: Plugins :: OpenID Connect Relying Party Login Flow</name>
    <packaging>pom</packaging>
    <description>Java OIDC ReylingParty Proxy authentication plugin for the Shibboleth IdP.</description>

    <properties>
        <idp.groupId>net.shibboleth.idp</idp.groupId>
        <idp.version>4.3.0</idp.version>
        <opensaml.groupId>org.opensaml</opensaml.groupId>
        <opensaml.version>4.3.0</opensaml.version>
        <java-support.version>8.4.0</java-support.version>
        <spring-extensions.version>6.3.0</spring-extensions.version>  
        <oidc.common.version>2.2.0</oidc.common.version>
        <idp.oidc.config.version>1.0.0</idp.oidc.config.version>
        <okhttp3.mockserver.version>4.9.3</okhttp3.mockserver.version>
        <okhttp3.tls.version>4.9.3</okhttp3.tls.version>
        <idp.oidc.groupId>net.shibboleth.oidc</idp.oidc.groupId>
        <checkstyle.configLocation>${project.basedir}/checkstyle.xml</checkstyle.configLocation>
    	<!-- 
    	   REMOVE this enforcer-data override once the parent is up to date with an enforcer-data that contains 
    	   net.shibboleth.idp.plugin.config.oidc. See https://shibboleth.atlassian.net/browse/JMVN-52
        -->
    	<maven-dist-enforcer-data.version>1.0.13</maven-dist-enforcer-data.version>
    </properties>

    <distributionManagement>
        <site>
            <id>site</id>
            <url>scp:${shibboleth.site.deploy.url}java-idp-plugin-oidc-rp/${project.version}/</url>
        </site>
    </distributionManagement>

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

    <modules>
        <module>idp-oidc-rp-impl</module>
        <module>idp-oidc-rp-api</module>
        <module>idp-oidc-rp-dist</module>
    </modules>

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

    <dependencies>
        <!-- Project wide test Dependencies -->
        <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>${slf4j.groupId}</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>        
    </dependencies>
    <dependencyManagement>
        <!-- java-idp-oidc-rp project dependencies -->
        <dependencies>
            <!-- OIDC Shared config, which is a runtime dependency to the whole project -->
             <dependency>
                <groupId>net.shibboleth.idp.plugin.config.oidc</groupId>
                <artifactId>idp-plugin-oidc-config-impl</artifactId>
                <version>${idp.oidc.config.version}</version>
            </dependency>
            <!-- Its own dependencies -->
            <dependency>
                <groupId>net.shibboleth.idp.plugin.authn</groupId>
                <artifactId>idp-plugin-oidc-rp-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>net.shibboleth.idp.plugin.authn</groupId>
                <artifactId>idp-plugin-oidc-rp-impl</artifactId>
                <version>${project.version}</version>
            </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>
            <!-- 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>
            <!-- Provided shibboleth support dependencies -->
            <dependency>
                <groupId>net.shibboleth.utilities</groupId>
                <artifactId>java-support</artifactId>
                <version>${java-support.version}</version>
                <scope>provided</scope>
            </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>
             <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>
            <dependency>
                <groupId>net.shibboleth.oidc</groupId>
                <artifactId>oidc-common-crypto-impl</artifactId>
                <version>${oidc.common.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>            
            <dependency>
                <groupId>net.shibboleth.idp.plugin.authn</groupId>
                <artifactId>idp-plugin-oidc-rp-api</artifactId>
                <version>${project.version}</version>
                <scope>test</scope>
                <type>test-jar</type>
            </dependency>
        </dependencies>
    </dependencyManagement>
    
    <profiles>
        <!--
            Pull in a Javascript engine for testing in Java
            versions where the JDK doesn't provide one.
        -->
        <profile>
            <id>get-nashorn</id>
            <activation>
                <jdk>[15,</jdk>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.openjdk.nashorn</groupId>
                    <artifactId>nashorn-core</artifactId>
                    <version>${nashorn.jdk.version}</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
    </profiles>
    
    <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>
