<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.dspace</groupId>
    <artifactId>xoai</artifactId>
    <name>XOAI : OAI-PMH Java Toolkit</name>
    <version>3.4.0</version>
    <description>XOAI - a powerful, flexible OAI-PMH Java Toolkit</description>
    <url>https://github.com/dspace/xoai</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>${project.build.sourceEncoding}</project.reporting.outputEncoding>
        <java.version>11</java.version>
    </properties>

    <build>
        <!-- Define Maven Plugin Settings / versions. -->
        <pluginManagement>
            <plugins>
                <!-- Use to enforce a particular version of Java and ensure no conflicting dependencies -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>3.4.1</version>
                    <executions>
                        <execution>
                            <id>enforce-java</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <requireJavaVersion>
                                        <version>${java.version}</version>
                                    </requireJavaVersion>
                                    <requireMavenVersion>
                                        <version>[3.0.5,)</version>
                                    </requireMavenVersion>
                                </rules>
                            </configuration>
                        </execution>
                        <!-- Make sure that we do not have conflicting dependencies-->
                        <execution>
                            <id>enforce-versions</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <DependencyConvergence />
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <!-- Used to compile all Java classes -->
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.11.0</version>
                    <configuration>
                      <release>${java.version}</release>
                    </configuration>
                </plugin>
                <!-- Used to package all JARs -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.2.2</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            </manifest>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.5.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.5.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.3.1</version>
                </plugin>
                <!-- Used to generate a new release via Sonatype (see release profile). -->
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.6.8</version>
                </plugin>
                <!-- Used to generate JavaDocs for new releases (see release profile). -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.5.0</version>
                    <configuration>
                        <!-- Never fail a build based on Javadoc errors -->
                        <failOnError>false</failOnError>
                    </configuration>
                </plugin>
                <!-- Used to generate source JARs for new releases (see release profile). -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.3.0</version>
                </plugin>
                <!-- Used to sign new releases via GPG (see release profile). -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.6</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <!-- Specify our settings for new releases via 'mvn release:*' -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <!-- During release:perform, enable the "release" profile (see below) -->
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy</goals>
                    <!-- Auto-Version all modules the same as the parent module -->
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
       <!--
         The 'release' profile is used by the 'maven-release-plugin' (see above)
         to actually perform an XOAI release to Maven central.
         This profile contains settings which are ONLY enabled when performing
         a DSpace module release. See alse https://wiki.duraspace.org/display/DSPACE/Release+Procedure
        -->
        <profile>
            <id>release</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <!-- Configure Nexus plugin for new releases via Sonatype.
                         See: http://central.sonatype.org/pages/apache-maven.html -->
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <extensions>true</extensions>
                        <configuration>
                            <!-- In your settings.xml, your username/password
                                 MUST be specified for server 'ossrh' -->
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <!-- Disable autoclose of repository after upload, as this sometimes times out -->
                            <skipStagingRepositoryClose>true</skipStagingRepositoryClose>
                            <!-- Require manual verification / release to Maven Central -->
                            <autoReleaseAfterClose>false</autoReleaseAfterClose>
                            <!-- Increase Staging timeout to 10mins -->
                            <stagingProgressTimeoutMinutes>10</stagingProgressTimeoutMinutes>
                        </configuration>
                    </plugin>
                    <!-- For new releases, generate Source JAR files -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- For new releases, generate JavaDocs for each module -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- Sign any new releases via GPG.
                         NOTE: you may optionall specify the "gpg.passphrase" in your settings.xml -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <dependencies>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.woodstox</groupId>
            <artifactId>woodstox-core</artifactId>
            <version>6.4.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>2.20.0</version>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.16.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-collections4</artifactId>
            <version>4.1</version>
        </dependency>
        <dependency>
            <groupId>net.sf.saxon</groupId>
            <artifactId>Saxon-HE</artifactId>
            <version>9.8.0-14</version>
        </dependency>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.3.1</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-runtime</artifactId>
            <version>2.3.8</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.14</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.12.0</version>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>3.12.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.13.0</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>32.0.0-jre</version>
        </dependency>
        <dependency>
            <groupId>org.dom4j</groupId>
            <artifactId>dom4j</artifactId>
            <version>2.1.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>jaxen</groupId>
            <artifactId>jaxen</artifactId>
            <version>1.1.4</version>
            <scope>runtime</scope>
        </dependency>
    </dependencies>

    <licenses>
        <license>
            <name>DSpace BSD License</name>
            <url>https://raw.github.com/DSpace/DSpace/main/LICENSE</url>
            <distribution>repo</distribution>
            <comments>
                A BSD 3-Clause license for the DSpace codebase.
            </comments>
        </license>
    </licenses>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/DSpace/xoai/issues</url>
    </issueManagement>

    <scm>
        <connection>scm:git:git@github.com:DSpace/xoai.git</connection>
        <developerConnection>scm:git:git@github.com:DSpace/xoai.git</developerConnection>
        <url>git@github.com:DSpace/xoai.git</url>
        <tag>xoai-3.4.0</tag>
    </scm>

    <!-- Configure our release repositories to use Sonatype.
         See: http://central.sonatype.org/pages/apache-maven.html -->
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <repositories>
        <!-- Check Maven Central first (before other repos below) -->
        <repository>
            <id>maven-central</id>
            <url>https://repo.maven.apache.org/maven2</url>
        </repository>
        <!-- Enable access to artifacts in Sonatype's snapshot repo for Snapshots ONLY -->
        <repository>
            <id>maven-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <layout>default</layout>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <developers>
        <developer>
            <name>DSpace @ Lyncode</name>
            <email>dspace@lyncode.com</email>
            <organization>Lyncode</organization>
            <url>http://www.lyncode.com</url>
            <roles>
                <role>original-developer</role>
            </roles>
        </developer>
        <developer>
            <name>DSpace Committers</name>
            <email>dspace-devel@googlegroups.com</email>
            <url>https://wiki.lyrasis.org/display/DSPACE/DSpace+Committers</url>
            <roles>
                <role>committer</role>
            </roles>
        </developer>
    </developers>

</project>
