<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.fcrepo</groupId>
  <artifactId>fcrepo-storage-ocfl</artifactId>
  <version>6.4.0-RC2</version>
  <packaging>jar</packaging>

  <name>fcrepo-storage-ocfl</name>
  <description>Fedora abstraction layer over OCFL library</description>
  <url>http://fedorarepository.org</url>

  <properties>
    <compiler.plugin.version>3.8.0</compiler.plugin.version>
    <fcrepo-build-tools.version>6.0.0</fcrepo-build-tools.version>
    <gpg.plugin.version>1.6</gpg.plugin.version> <jackson.version>2.13.0</jackson.version>
    <license.plugin.version>3.0</license.plugin.version>
    <project.java.source>11</project.java.source>
    <project_name>${project.artifactId}</project_name>
    <release.plugin.version>2.5.2</release.plugin.version>
    <scm-provider-gitexe.plugin.version>1.9.4</scm-provider-gitexe.plugin.version>
    <checkstyle.plugin.version>3.1.1</checkstyle.plugin.version>
    <source.plugin.version>3.0.1</source.plugin.version>
    <javadoc.plugin.version>3.2.0</javadoc.plugin.version>
    <ocfl-java.version>2.2.1</ocfl-java.version>
    <sonatype.host>s01.oss.sonatype.org</sonatype.host>
  </properties>

  <scm>
    <connection>scm:git:git://github.com/fcrepo/${project_name}.git</connection>
    <developerConnection>scm:git:git@github.com:fcrepo/${project_name}.git</developerConnection>
    <url>https://github.com/fcrepo/${project_name}</url>
    <tag>fcrepo-storage-ocfl-6.4.0-RC2</tag>
  </scm>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>${checkstyle.plugin.version}</version>
        <dependencies>
          <dependency>
            <groupId>org.fcrepo</groupId>
            <artifactId>fcrepo-build-tools</artifactId>
            <version>${fcrepo-build-tools.version}</version>
          </dependency>
          <!-- Override dependencies to use latest version of checkstyle -->
          <dependency>
            <groupId>com.puppycrawl.tools</groupId>
            <artifactId>checkstyle</artifactId>
            <version>8.34</version>
          </dependency>
        </dependencies>
        <configuration>
          <includeTestSourceDirectory>true</includeTestSourceDirectory>
          <consoleOutput>true</consoleOutput>
          <logViolationsToConsole>true</logViolationsToConsole>
          <failsOnError>true</failsOnError>
          <failOnViolation>true</failOnViolation>
          <violationSeverity>warning</violationSeverity>
          <configLocation>fcrepo-checkstyle/checkstyle.xml</configLocation>
          <suppressionsLocation>fcrepo-checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
        </configuration>
        <executions>
          <execution>
            <id>checkstyle</id>
            <phase>verify</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${javadoc.plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>${source.plugin.version}</version>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${compiler.plugin.version}</version>
        <configuration>
          <debug>true</debug>
          <release>${project.java.source}</release>
          <compilerArgument>-Xlint:unchecked,deprecation</compilerArgument>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <version>${release.plugin.version}</version>
        <configuration>
          <!-- see http://jira.codehaus.org/browse/MRELEASE-424 -->
          <mavenExecutorId>forked-path</mavenExecutorId>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-provider-gitexe</artifactId>
            <version>${scm-provider-gitexe.plugin.version}</version>
          </dependency>
        </dependencies>
      </plugin>
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>${license.plugin.version}</version>
          <configuration>
            <header>fcrepo-license/LICENSE_HEADER.txt</header>
            <mapping>
                <java>SLASHSTAR_STYLE</java>
            </mapping>
            <includes>
              <include>**/src/main/java/**</include>
              <include>**/src/test/java/**</include>
            </includes>
            <excludes>
              <exclude>target/**</exclude>
              <exclude>**/src/test/resources/**</exclude>
              <exclude>**/src/main/resources/**</exclude>
              <exclude>**/*.properties</exclude>
            </excludes>
            <properties>
              <name>${project.artifactId}</name>
              <year>${project.copyrightYear}</year>
              <holder>${project.organization.name}</holder>
            </properties>
            <encoding>UTF-8</encoding>
            <strictCheck>true</strictCheck>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>org.fcrepo</groupId>
              <artifactId>fcrepo-build-tools</artifactId>
              <version>${fcrepo-build-tools.version}</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>io.ocfl</groupId>
      <artifactId>ocfl-java-core</artifactId>
      <version>${ocfl-java.version}</version>
      <exclusions>
        <exclusion>
          <groupId>com.github.ben-manes.caffeine</groupId>
          <artifactId>caffeine</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <version>${jackson.version}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
      <version>${jackson.version}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>${jackson.version}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.datatype</groupId>
      <artifactId>jackson-datatype-jsr310</artifactId>
      <version>${jackson.version}</version>
    </dependency>

    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.14.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>3.12.0</version>
    </dependency>
    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
      <version>1.15</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.32</version>
    </dependency>

    <dependency>
      <groupId>com.github.ben-manes.caffeine</groupId>
      <artifactId>caffeine</artifactId>
      <version>3.0.4</version>
    </dependency>

    <!-- Test -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest</artifactId>
      <version>2.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>5.14.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <distributionManagement>
    <site>
      <id>gh-pages</id>
      <name>Deployment through GitHub's site deployment plugin</name>
      <url>site/${project.version}</url>
    </site>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Shapshots</name>
      <url>https://${sonatype.host}/content/repositories/snapshots/</url>
    </snapshotRepository>
    <repository>
      <id>sonatype-nexus-staging</id>
      <url>https://${sonatype.host}/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <profiles>
    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
            <plugin>
              <artifactId>maven-gpg-plugin</artifactId>
              <version>${gpg.plugin.version}</version>
              <executions>
                <execution>
                  <id>sign-artifacts</id>
                  <phase>verify</phase>
                  <goals>
                    <goal>sign</goal>
                  </goals>
                </execution>
              </executions>
              <configuration>
                <useAgent>true</useAgent>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      <comments>Copyright (c) 2015-2021 Lyrasis</comments>
    </license>
  </licenses>

  <repositories>
    <repository>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://${sonatype.host}/content/repositories/snapshots</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://${sonatype.host}/content/repositories/snapshots</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

  <developers>
    <developer>
      <id>pwinckles</id>
      <name>Peter Winckles</name>
      <email>peter.winckles @ (domain of organization url)</email>
      <organization>University of Wisconsin</organization>
      <organizationUrl>https://www.wisc.edu/</organizationUrl>
      <roles>
        <role>developer</role>
      </roles>
      <timezone>-6</timezone>
    </developer>
  </developers>

</project>
