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

    <name>java-support</name>
    <groupId>net.shibboleth.utilities</groupId>
    <artifactId>java-support</artifactId>
    <!-- If you change the version you *MUST* provoke a jenkins 'site'
         build (to populate the javadoc, which is consumed by the
         Jenkins 'nightly' builds).
    -->
    <version>8.4.0</version>
    <packaging>jar</packaging>

    <properties>
        <automatic.module.name>net.shibboleth.utilities.java.support</automatic.module.name>
    </properties>

    <scm>
        <connection>scm:git:https://git.shibboleth.net/git/${project.artifactId}</connection>
        <developerConnection>scm:git:git@git.shibboleth.net:${project.artifactId}</developerConnection>
        <url>https://git.shibboleth.net/view/?p=${project.artifactId}.git</url>
    </scm>

    <dependencies>
        <!-- Compile Dependencies -->
        <dependency>
            <groupId>${slf4j.groupId}</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>

        <!-- OPTIONAL Compile Dependencies -->
        <dependency>
            <!-- Required if you're using classes from the logging package. -->
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>compile</scope><!-- normally runtime -->
            <optional>true</optional>
        </dependency>
        <dependency>
            <!-- Required if you're using classes from the logging package. -->
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
            <scope>compile</scope><!-- normally runtime -->
            <optional>true</optional>
        </dependency>
        <dependency>
            <!-- Required if you're using anything in the httpclient package -->
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <!-- Required if you're using anything in the httpclient package -->
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient-cache</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <!-- Required if you're using anything in the httpclient package -->
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <!-- Required if using classes with command line support. -->
            <groupId>com.beust</groupId>
            <artifactId>jcommander</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <!-- Required if you're using classes from the velocity package -->
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity-engine-core</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <!--  Required if you're using classes from the security package. -->
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcprov-jdk18on</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <!--  Required if you're using classes from the security package. -->
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcpkix-jdk18on</artifactId>
            <optional>true</optional>
        </dependency>

        <!-- Provided Dependencies -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Runtime Dependencies -->

        <!-- Test Dependencies -->
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${spring.groupId}</groupId>
            <artifactId>spring-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${spring.groupId}</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${spring.groupId}</groupId>
            <artifactId>spring-web</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

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

    <distributionManagement>
        <site>
            <id>site</id>
            <url>scp:${shibboleth.site.deploy.url}${project.artifactId}/${project.version}/</url>
        </site>
    </distributionManagement>

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

</project>
