<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>
    <artifactId>dspace-oai</artifactId>
    <packaging>jar</packaging>
    <name>DSpace OAI-PMH</name>
    <description>DSpace OAI-PMH Extension</description>

    <parent>
        <artifactId>dspace-parent</artifactId>
        <groupId>org.dspace</groupId>
        <version>8.1</version>
        <relativePath>..</relativePath>
    </parent>

    <properties>
        <!-- This is the path to the root [dspace-src] directory. -->
        <root.basedir>${basedir}/..</root.basedir>
        <xoai.version>3.4.0</xoai.version>
        <jtwig.version>5.87.0.RELEASE</jtwig.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <configuration>
                    <excludes>
                        <!-- Ignore license header requirements on CSS/images/HTML/XSL -->
                        <exclude>src/main/resources/**</exclude>
                        <exclude>**/*.xsl</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>commons-cli</groupId>
            <artifactId>commons-cli</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>

        <!-- OAI Data Provider Framework -->
        <dependency>
            <groupId>org.dspace</groupId>
            <artifactId>xoai</artifactId>
            <version>${xoai.version}</version>
            <exclusions>
                <!-- Use version provided by SolrJ -->
                <exclusion>
                    <groupId>com.fasterxml.woodstox</groupId>
                    <artifactId>woodstox-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- Java Injection -->
        <dependency>
            <groupId>jakarta.inject</groupId>
            <artifactId>jakarta.inject-api</artifactId>
        </dependency>

        <!-- Needed to support Spring @Configuration classes (to register servlets/beans with Spring Boot webapp) -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
            <version>${spring-boot.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-logging</artifactId>
                </exclusion>
                <!-- Spring JCL is unnecessary and conflicts with commons-logging when both are on classpath -->
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-jcl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- Templating Engine -->
        <dependency>
            <groupId>org.jtwig</groupId>
            <artifactId>jtwig-spring-boot-starter</artifactId>
            <version>${jtwig.version}</version>
            <exclusions>
                <!-- We don't need spring-boot-starter-web, it is provided by our Spring Boot webapp -->
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-web</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- Internal -->
        <dependency>
            <groupId>org.dspace</groupId>
            <artifactId>dspace-api</artifactId>
        </dependency>

        <!-- Web API -->
        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Logging -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
        </dependency>

        <!-- Testing -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- Note: XOAI requires hamcrest both for testing and runtime -->
        <!-- As our Parent POM sets this to 'test' scope, we must override it -->
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-inline</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${spring.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.xmlmatchers</groupId>
            <artifactId>xml-matchers</artifactId>
            <version>0.10</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
