<?xml version="1.0" encoding="UTF-8"?>

<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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>net.shibboleth</groupId>
        <artifactId>parent</artifactId>
        <version>11.3.1</version>
    </parent>

    <name>Shibboleth Identity Provider</name>
    <description>
        A SAML 1.1 and 2.0 identity provider implementation.

        For more information, including how to install and configure the IdP, see https://wiki.shibboleth.net/confluence/display/IDP30/Home
    </description>

    <groupId>net.shibboleth.idp</groupId>
    <artifactId>idp-parent</artifactId>
    <version>4.2.0</version>
    <packaging>pom</packaging>

    <modules>
        <module>../idp-core</module>
        <module>../idp-schema</module>

        <module>../idp-admin-api</module>
        <module>../idp-authn-api</module>
        <module>../idp-attribute-api</module>
        <module>../idp-attribute-resolver-api</module>
        <module>../idp-attribute-filter-api</module>
        <module>../idp-cas-api</module>
        <module>../idp-profile-api</module>
        <module>../idp-saml-api</module>
        <module>../idp-session-api</module>
        <module>../idp-consent-api</module>

        <module>../idp-admin-impl</module>
        <module>../idp-authn-impl</module>
        <module>../idp-attribute-impl</module>
        <module>../idp-attribute-resolver-impl</module>
        <module>../idp-attribute-filter-impl</module>
        <module>../idp-cas-impl</module>
        <module>../idp-consent-impl</module>
        <module>../idp-profile-impl</module>
        <module>../idp-saml-impl</module>
        <module>../idp-session-impl</module>

        <module>../idp-attribute-resolver-spring</module>
        <module>../idp-attribute-filter-spring</module>
        <module>../idp-profile-spring</module>

        <module>../idp-war</module>
        <module>../idp-war-distribution</module>
        <module>../idp-installer</module>
        <module>../idp-conf</module>
        <module>../idp-conf-impl</module>
        <module>../idp-distribution</module>

        <module>../idp-ui</module>

        <module>../idp-bom</module>
        <module>../idp-tests-bom</module>
    </modules>

    <properties>
        <idwsfconsumer.version>2.1.0</idwsfconsumer.version>
        <java-support.version>8.3.1</java-support.version>
        <opensaml.groupId>org.opensaml</opensaml.groupId>
        <opensaml.version>4.2.0</opensaml.version>
        <spring-extensions.version>6.2.0</spring-extensions.version>
        <checkstyle.configLocation>${project.basedir}/../idp-parent/resources/checkstyle/checkstyle.xml</checkstyle.configLocation>
        <idp-parent.site.url>${shibboleth.site.deploy.url}java-identity-provider/${project.version}/</idp-parent.site.url>
        <idp-module.site.url>${idp-parent.site.url}${project.artifactId}</idp-module.site.url>
    </properties>

    <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>
    <!-- This file should contain NO additional dependencies unless they truly apply to every "every module. See IDP-1620. -->
        <dependency>
            <groupId>${slf4j.groupId}</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <!-- Provided Dependencies -->

        <!-- Runtime Dependencies -->

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

    </dependencies>

    <!-- Dependencies which are not required by every project module but for which every module should use the same version
        of the dependency should go here. That is to say, placing a dependency here allows one to "peg" the version of the artifact
        used by all project modules. -->
    <dependencyManagement>
        <dependencies>
        <!-- Import Dependencies:  OpenSAML -->
            <dependency>
                <groupId>${opensaml.groupId}</groupId>
                <artifactId>opensaml-bom</artifactId>
                <version>${opensaml.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>${opensaml.groupId}</groupId>
                <artifactId>opensaml-tests-bom</artifactId>
                <version>${opensaml.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <!-- Compile Dependencies -->

            <dependency>
                <groupId>net.shibboleth.utilities</groupId>
                <artifactId>java-support</artifactId>
                <version>${java-support.version}</version>
            </dependency>
            <dependency>
                <groupId>net.shibboleth.ext</groupId>
                <artifactId>spring-extensions</artifactId>
                <version>${spring-extensions.version}</version>
            </dependency>

            <!-- Provided Dependencies -->

            <!-- Runtime Dependencies -->

            <!-- Test Dependencies -->
            <dependency>
                <groupId>net.shibboleth.ext</groupId>
                <artifactId>spring-extensions</artifactId>
                <version>${spring-extensions.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>net.shibboleth.utilities</groupId>
                <artifactId>java-support</artifactId>
                <version>${java-support.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <scm>
        <connection>${shibboleth.scm.connection}java-identity-provider</connection>
        <developerConnection>${shibboleth.scm.developerConnection}java-identity-provider</developerConnection>
        <url>${shibboleth.scm.url}java-identity-provider.git</url>
    </scm>

    <distributionManagement>
        <site>
            <id>site</id>
            <url>scp:${idp-parent.site.url}</url>
        </site>
    </distributionManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-descriptor</id>
                        <goals>
                            <goal>attach-descriptor</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <siteDirectory>../idp-parent/src/site</siteDirectory>
                </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>
                            <Sealed>true</Sealed>
                        </manifestEntries>
                    </archive>
                </configuration>
             </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>banned-dependencies</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <bannedDependencies>
                                    <excludes>
                                        <!--
                                            Ban use of old variants of the Java EE
                                            component implementations, and of the
                                            corresponding API modules.
                                        -->
                                        <exclude>jakarta.activation:jakarta.activation-api</exclude>
                                        <exclude>javax.activation:activation</exclude>
                                        <exclude>javax.activation:activation-api</exclude>
                                        <exclude>javax.mail:mail</exclude>
                                        <exclude>javax.xml.bind:jaxb-api</exclude>
                                        <exclude>com.sun.mail:javax.mail</exclude>
                                    </excludes>
                                    <includes>
                                        <!--
                                            Allow a harmless case where the dependency will be
                                            satisfied by another artifact.
                                        -->
                                        <include>jakarta.activation:jakarta.activation-api:*:jar:provided</include>
                                    </includes>
                                </bannedDependencies>
                            </rules>
                            <fail>true</fail>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>

    </build>

</project>
