<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>7.2</version>
        <relativePath>..</relativePath>
    </parent>

    <properties>
        <!-- This is the path to the root [dspace-src] directory. -->
        <root.basedir>${basedir}/..</root.basedir>
        <xoai.version>3.3.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>

    <profiles>
        <profile>
            <id>oracle-support</id>
            <activation>
                <property>
                    <name>db.name</name>
                    <value>oracle</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>com.oracle</groupId>
                    <artifactId>ojdbc6</artifactId>
                </dependency>
            </dependencies>
        </profile>
    </profiles>

    <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>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-all</artifactId>
                </exclusion>
                <exclusion>
                    <!--Hard pinned below.-->
                    <groupId>org.mockito</groupId>
                    <artifactId>mockito-all</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xml-apis</groupId>
                    <artifactId>xml-apis</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.commons</groupId>
                    <artifactId>commons-lang3</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
                <!-- Later version provided by SolrJ -->
                <exclusion>
                    <groupId>org.codehaus.woodstox</groupId>
                    <artifactId>wstx-asl</artifactId>
                </exclusion>
                <!-- Later version provided by Hibernate -->
                <exclusion>
                    <groupId>org.dom4j</groupId>
                    <artifactId>dom4j</artifactId>
                </exclusion>
                <!-- We don't use this test framework & it causes dependency convergence issues -->
                <exclusion>
                    <groupId>com.lyncode</groupId>
                    <artifactId>test-support</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- Java Injection -->
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>1</version>
        </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>
            </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>
                <!-- More recent version is pulled in via below dependencies -->
                <exclusion>
                    <groupId>org.parboiled</groupId>
                    <artifactId>parboiled-java</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- Newer version, necessary to align with newer version of ASM in parent POM
             This is needed by both jtwig-spring-boot-starter and our tests. -->
        <dependency>
            <groupId>org.parboiled</groupId>
            <artifactId>parboiled-java</artifactId>
            <version>1.3.1</version>
        </dependency>

        <!-- Internal -->
        <dependency>
            <groupId>org.dspace</groupId>
            <artifactId>dspace-api</artifactId>
        </dependency>

        <!-- Web API -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Logging -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j-impl</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-1.2-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-all</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>
