<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>
    <groupId>org.dataone</groupId>
    <artifactId>d1_portal</artifactId>
    <version>3.0.0-SNAPSHOT</version>
    <name>d1_portal</name>  
    <packaging>jar</packaging>
    <url>http://maven.apache.org</url>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <compiler.target.version>25</compiler.target.version>
        <d1_libclient_java.version>2.4.1</d1_libclient_java.version>
        <bouncycastle.version>1.86</bouncycastle.version>
    </properties>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.11.0</version>
                <configuration>
                    <release>${compiler.target.version}</release>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.3.0</version>
            </plugin>
        </plugins>
        <extensions>
            <!-- deploys to maven.dataone.org over the local ssh/scp (the scpexe:// URL below) -->
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh-external</artifactId>
                <version>3.5.3</version>
            </extension>
        </extensions>
    </build>
    <distributionManagement>
        <repository>
            <uniqueVersion>false</uniqueVersion>
            <id>maven.dataone.org</id>
            <name>DataONE</name>
            <url>scpexe://maven.dataone.org/var/www/maven</url>
            <layout>default</layout>
        </repository>
    </distributionManagement>
    <repositories>
        <repository>
            <id>dataone.org</id>
            <url>https://maven.dataone.org/</url>
            <releases>
                    <enabled>true</enabled>
            </releases>
            <snapshots>
                    <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>
    <dependencyManagement>
        <!-- Override vulnerable transitive dependency versions -->
        <dependencies>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk18on</artifactId>
                <version>${bouncycastle.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcpkix-jdk18on</artifactId>
                <version>${bouncycastle.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcutil-jdk18on</artifactId>
                <version>${bouncycastle.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-collections</groupId>
                <artifactId>commons-collections</artifactId>
                <version>3.2.2</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
                <version>2.26.1</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <!-- Declared first so its transitive dependency versions win Maven's conflict resolution -->
        <dependency>
            <groupId>org.dataone</groupId>
            <artifactId>d1_libclient_java</artifactId>
            <version>${d1_libclient_java.version}</version>
            <type>jar</type>
            <exclusions>
                <!-- foresite is only needed for ORE resource maps, which the portal doesn't use -->
                <exclusion>
                    <groupId>com.googlecode.foresite-toolkit</groupId>
                    <artifactId>foresite</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
<!-- API, java.xml.bind module -->
        <dependency>
            <groupId>jakarta.xml.bind</groupId>
            <artifactId>jakarta.xml.bind-api</artifactId>
            <version>2.3.2</version>
            </dependency>
        <!-- Runtime, com.sun.xml.bind module -->
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-runtime</artifactId>
            <version>2.3.2</version>
        </dependency>
        <dependency>
            <groupId>com.nimbusds</groupId>
            <artifactId>nimbus-jose-jwt</artifactId>
            <version>10.10</version>
            <exclusions>
                <exclusion>
                    <groupId>org.bouncycastle</groupId>
                    <artifactId>bcprov-jdk15on</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- d1_libclient_java uses the log4j 1.x API without declaring it; it used to arrive
             through oa4mp. TODO: move to the log4j 2 bridge (log4j-1.2-api) with the webapps'
             logging configuration. -->
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.0.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <scm>
      <url>https://github.com/DataONEorg/d1_portal</url>
      <connection>scm:git:https://github.com/DataONEorg/d1_portal.git</connection>
      <developerConnection>scm:git:ssh://git@github.com/DataONEorg/d1_portal.git</developerConnection>
      <tag>HEAD</tag>
    </scm>
</project>
