<?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>17.2.3</version>
    </parent>

    <name>Shibboleth Attribute Components</name>
    <description>
        Shared modules providing API and implementation of Attribute resolution, filtering,
          encoding/decoding, and other related features needed by IdP and SP implementations.
    </description>

    <artifactId>shib-attribute-parent</artifactId>
    <version>5.2.3</version>
    <packaging>pom</packaging>

    <modules>
        <module>shib-attribute-api</module>
        <module>shib-attribute-resolver-api</module>
        <module>shib-attribute-filter-api</module>
        <module>shib-saml-attribute-api</module>

        <module>shib-attribute-impl</module>
        <module>shib-attribute-resolver-impl</module>
        <module>shib-attribute-filter-impl</module>
        <module>shib-saml-attribute-impl</module>

        <module>shib-attribute-resolver-spring</module>
        <module>shib-attribute-filter-spring</module>

        <module>shib-attribute-testing</module>

        <module>shib-attribute-bom</module>
    </modules>

    <properties>
        <shibboleth.projectName>java-shib-attribute</shibboleth.projectName>
        <shib-shared.groupId>net.shibboleth</shib-shared.groupId>
        <shib-shared.version>9.2.3</shib-shared.version>
        <opensaml.groupId>org.opensaml</opensaml.groupId>
        <opensaml.version>5.2.3</opensaml.version>
        <shib-metadata.groupId>net.shibboleth</shib-metadata.groupId>
        <shib-metadata.version>5.2.3</shib-metadata.version>

        <checkstyle.configLocation>${project.basedir}/resources/checkstyle/checkstyle.xml</checkstyle.configLocation>
    </properties>

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

        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
        </dependency>

        <dependency>
            <groupId>${shib-shared.groupId}</groupId>
            <artifactId>shib-support</artifactId>
            <version>${shib-shared.version}</version>
        </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>
            <!-- Compile Dependencies -->
            <dependency>
                <groupId>${shib-metadata.groupId}</groupId>
                <artifactId>shib-metadata-api</artifactId>
                <version>${shib-metadata.version}</version>
            </dependency>
            <dependency>
                <groupId>${shib-metadata.groupId}</groupId>
                <artifactId>shib-metadata-impl</artifactId>
                <version>${shib-metadata.version}</version>
            </dependency>
            <dependency>
                <groupId>${shib-metadata.groupId}</groupId>
                <artifactId>shib-metadata-spring</artifactId>
                <version>${shib-metadata.version}</version>
            </dependency>

            <dependency>
                <groupId>${opensaml.groupId}</groupId>
                <artifactId>opensaml-core-api</artifactId>
                <version>${opensaml.version}</version>
            </dependency>
            <dependency>
                <groupId>${opensaml.groupId}</groupId>
                <artifactId>opensaml-core-impl</artifactId>
                <version>${opensaml.version}</version>
            </dependency>
            <dependency>
                <groupId>${opensaml.groupId}</groupId>
                <artifactId>opensaml-messaging-api</artifactId>
                <version>${opensaml.version}</version>
            </dependency>
            <dependency>
                <groupId>${opensaml.groupId}</groupId>
                <artifactId>opensaml-messaging-impl</artifactId>
                <version>${opensaml.version}</version>
            </dependency>
            <dependency>
                <groupId>${opensaml.groupId}</groupId>
                <artifactId>opensaml-profile-api</artifactId>
                <version>${opensaml.version}</version>
            </dependency>
            <dependency>
                <groupId>${opensaml.groupId}</groupId>
                <artifactId>opensaml-profile-impl</artifactId>
                <version>${opensaml.version}</version>
            </dependency>
            <dependency>
                <groupId>${opensaml.groupId}</groupId>
                <artifactId>opensaml-saml-api</artifactId>
                <version>${opensaml.version}</version>
            </dependency>
            <dependency>
                <groupId>${opensaml.groupId}</groupId>
                <artifactId>opensaml-saml-impl</artifactId>
                <version>${opensaml.version}</version>
            </dependency>
            <dependency>
                <groupId>${opensaml.groupId}</groupId>
                <artifactId>opensaml-security-api</artifactId>
                <version>${opensaml.version}</version>
            </dependency>
            <dependency>
                <groupId>${opensaml.groupId}</groupId>
                <artifactId>opensaml-security-impl</artifactId>
                <version>${opensaml.version}</version>
            </dependency>
            <dependency>
                <groupId>${opensaml.groupId}</groupId>
                <artifactId>opensaml-soap-api</artifactId>
                <version>${opensaml.version}</version>
            </dependency>
            <dependency>
                <groupId>${opensaml.groupId}</groupId>
                <artifactId>opensaml-soap-impl</artifactId>
                <version>${opensaml.version}</version>
            </dependency>
            <dependency>
                <groupId>${opensaml.groupId}</groupId>
                <artifactId>opensaml-spring</artifactId>
                <version>${opensaml.version}</version>
            </dependency>
            <dependency>
                <groupId>${opensaml.groupId}</groupId>
                <artifactId>opensaml-storage-api</artifactId>
                <version>${opensaml.version}</version>
            </dependency>
            <dependency>
                <groupId>${opensaml.groupId}</groupId>
                <artifactId>opensaml-storage-impl</artifactId>
                <version>${opensaml.version}</version>
            </dependency>
            <dependency>
                <groupId>${opensaml.groupId}</groupId>
                <artifactId>opensaml-xmlsec-api</artifactId>
                <version>${opensaml.version}</version>
            </dependency>
            <dependency>
                <groupId>${opensaml.groupId}</groupId>
                <artifactId>opensaml-xmlsec-impl</artifactId>
                <version>${opensaml.version}</version>
            </dependency>

            <dependency>
                <groupId>${shib-shared.groupId}</groupId>
                <artifactId>shib-cli</artifactId>
                <version>${shib-shared.version}</version>
            </dependency>
            <dependency>
                <groupId>${shib-shared.groupId}</groupId>
                <artifactId>shib-networking</artifactId>
                <version>${shib-shared.version}</version>
            </dependency>
            <dependency>
                <groupId>${shib-shared.groupId}</groupId>
                <artifactId>shib-networking-spring</artifactId>
                <version>${shib-shared.version}</version>
            </dependency>
            <dependency>
                <groupId>${shib-shared.groupId}</groupId>
                <artifactId>shib-security</artifactId>
                <version>${shib-shared.version}</version>
            </dependency>
            <dependency>
                <groupId>${shib-shared.groupId}</groupId>
                <artifactId>shib-security-spring</artifactId>
                <version>${shib-shared.version}</version>
            </dependency>
            <dependency>
                <groupId>${shib-shared.groupId}</groupId>
                <artifactId>shib-service</artifactId>
                <version>${shib-shared.version}</version>
            </dependency>
            <dependency>
                <groupId>${shib-shared.groupId}</groupId>
                <artifactId>shib-spring</artifactId>
                <version>${shib-shared.version}</version>
            </dependency>
            <dependency>
                <groupId>${shib-shared.groupId}</groupId>
                <artifactId>shib-support</artifactId>
                <version>${shib-shared.version}</version>
            </dependency>
            <dependency>
                <groupId>${shib-shared.groupId}</groupId>
                <artifactId>shib-velocity</artifactId>
                <version>${shib-shared.version}</version>
            </dependency>
            <dependency>
                <groupId>${shib-shared.groupId}</groupId>
                <artifactId>shib-velocity-spring</artifactId>
                <version>${shib-shared.version}</version>
            </dependency>

            <!-- Provided Dependencies -->

            <!-- Runtime Dependencies -->

            <!-- Test Dependencies -->
            <dependency>
                <groupId>${shib-metadata.groupId}</groupId>
                <artifactId>shib-metadata-testing</artifactId>
                <version>${shib-metadata.version}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>${opensaml.groupId}</groupId>
                <artifactId>opensaml-testing</artifactId>
                <version>${opensaml.version}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>${shib-shared.groupId}</groupId>
                <artifactId>shib-testing</artifactId>
                <version>${shib-shared.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>
                    </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>
                            <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>
                                        <!--
                                            Ban use of the EE 7 version of
                                            hibernate-core for Hibernate V5.
                                            Must use hibernate-core-jakarta instead.
                                        -->
                                        <exclude>org.hibernate:hibernate-core</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>
