<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>io.tileverse.rangereader</groupId>
  <artifactId>tileverse-rangereader-parent</artifactId>
  <version>1.0.0</version>
  <packaging>pom</packaging>
  <name>Tileverse Range Reader</name>
  <description>A Java 17 library for reading content from multiple sources using range readers</description>
  <url>https://tileverse.io</url>
  <licenses>
    <license>
      <name>Apache License 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Gabriel Roldan</name>
      <email>gabriel.roldan@gmail.com</email>
      <organization>Multiversio LLC</organization>
      <organizationUrl>https://multivers.io</organizationUrl>
    </developer>
  </developers>
  <modules>
    <module>dependencies</module>
    <module>bom</module>
    <module>src</module>
    <module>benchmarks</module>
  </modules>
  <scm>
    <connection>scm:git:https://github.com/tileverse-io/tileverse-rangereader.git</connection>
    <developerConnection>scm:git:https://github.com/tileverse-io/tileverse-rangereader.git</developerConnection>
    <url>https://github.com/tileverse-io/tileverse-rangereader</url>
  </scm>
  <issueManagement>
    <system>GitHub Issues</system>
    <url>https://github.com/tileverse-io/tileverse-rangereader/issues</url>
  </issueManagement>
  <distributionManagement>
    <repository>
      <id>central</id>
      <url>https://central.sonatype.com/api/v1/publisher/deployments/upload</url>
    </repository>
    <snapshotRepository>
      <id>central</id>
      <url>https://central.sonatype.com/repository/maven-snapshots/</url>
    </snapshotRepository>
  </distributionManagement>
  <properties>
    <maven.compiler.release>17</maven.compiler.release>
    <wiremock.version>3.13.1</wiremock.version>
    <spotless.action>apply</spotless.action>
    <mockito.version>5.18.0</mockito.version>
    <revision>1.0-SNAPSHOT</revision>
    <fmt.skip>false</fmt.skip>
    <spotless.skip>${fmt.skip}</spotless.skip>
    <lombok.version>1.18.38</lombok.version>
    <testcontainers.version>1.21.3</testcontainers.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <assertj.version>3.27.3</assertj.version>
    <awaitility.version>4.3.0</awaitility.version>
    <junit.version>5.13.2</junit.version>
    <gpg.skip>true</gpg.skip>
    <sortpom.action>sort</sortpom.action>
    <commons-io.version>2.19.0</commons-io.version>
    <logback.version>1.5.18</logback.version>
    <sortpom.skip>${fmt.skip}</sortpom.skip>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>${lombok.version}</version>
        <scope>provided</scope>
        <optional>true</optional>
      </dependency>
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>${logback.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${commons-io.version}</version>
      </dependency>
      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>${junit.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.testcontainers</groupId>
        <artifactId>testcontainers-bom</artifactId>
        <version>${testcontainers.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>io.aiven</groupId>
        <artifactId>testcontainers-fake-gcs-server</artifactId>
        <version>0.2.0</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>${mockito.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-junit-jupiter</artifactId>
        <version>${mockito.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>${assertj.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.wiremock</groupId>
        <artifactId>wiremock-standalone</artifactId>
        <version>${wiremock.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.awaitility</groupId>
        <artifactId>awaitility</artifactId>
        <version>${awaitility.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.openjdk.jmh</groupId>
        <artifactId>jmh-core</artifactId>
        <version>1.37</version>
      </dependency>
      <dependency>
        <groupId>org.openjdk.jmh</groupId>
        <artifactId>jmh-generator-annprocess</artifactId>
        <version>1.37</version>
        <scope>provided</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <repositories>
    <repository>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>central-portal-snapshots</id>
      <name>Central Portal Snapshots</name>
      <url>https://central.sonatype.com/repository/maven-snapshots/</url>
    </repository>
  </repositories>
  <build>
    <resources>
      <resource>
        <targetPath>META-INF</targetPath>
        <filtering>true</filtering>
        <directory>${user.dir}</directory>
        <includes>
          <include>LICENSE</include>
          <include>NOTICE</include>
        </includes>
      </resource>
      <resource>
        <directory>${project.basedir}/src/main/resources</directory>
      </resource>
    </resources>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.14.0</version>
          <inherited>true</inherited>
          <configuration>
            <release>${maven.compiler.release}</release>
            <annotationProcessorPaths>
              <path>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
              </path>
            </annotationProcessorPaths>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>3.5.0</version>
          <executions>
            <execution>
              <id>enforce-rules</id>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <rules>
                  <requireJavaVersion>
                    <version>[${maven.compiler.release}},)</version>
                    <message>Java ${maven.compiler.release} or newer is required to build this project</message>
                  </requireJavaVersion>
                  <dependencyConvergence>
                    <excludedScopes>test</excludedScopes>
                  </dependencyConvergence>
                  <requireMavenVersion>
                    <version>[3.9.0,)</version>
                    <message>Maven 3.9.0 or newer is required</message>
                  </requireMavenVersion>
                  <requireReleaseDeps>
                    <onlyWhenRelease>true</onlyWhenRelease>
                    <searchTransitive>true</searchTransitive>
                  </requireReleaseDeps>
                </rules>
              </configuration>
            </execution>
          </executions>
          <inherited>true</inherited>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.5.3</version>
          <inherited>true</inherited>
          <configuration>
            <argLine>--add-opens=java.net.http/jdk.internal.net.http=ALL-UNNAMED</argLine>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>3.5.3</version>
          <executions>
            <execution>
              <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
              </goals>
            </execution>
          </executions>
          <inherited>true</inherited>
          <configuration>
            <argLine>--add-opens=java.net.http/jdk.internal.net.http=ALL-UNNAMED</argLine>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.4.2</version>
          <executions>
            <execution>
              <id>test-jar</id>
              <goals>
                <goal>test-jar</goal>
              </goals>
              <configuration>
                <excludes>
                  <exclude>**/logback-test.xml</exclude>
                  <exclude>logback-test.xml</exclude>
                </excludes>
              </configuration>
            </execution>
          </executions>
          <inherited>true</inherited>
          <configuration>
            <excludes>
              <exclude>**/logback-test.xml</exclude>
            </excludes>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.3.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.11.2</version>
        </plugin>
        <plugin>
          <groupId>org.xolstice.maven.plugins</groupId>
          <artifactId>protobuf-maven-plugin</artifactId>
          <version>0.6.1</version>
        </plugin>
        <plugin>
          <groupId>com.diffplug.spotless</groupId>
          <artifactId>spotless-maven-plugin</artifactId>
          <version>2.44.5</version>
        </plugin>
        <plugin>
          <groupId>com.github.ekryd.sortpom</groupId>
          <artifactId>sortpom-maven-plugin</artifactId>
          <version>4.0.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>3.8.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-shade-plugin</artifactId>
          <version>3.6.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>flatten-maven-plugin</artifactId>
          <version>1.6.0</version>
        </plugin>
        <plugin>
          <groupId>org.sonatype.central</groupId>
          <artifactId>central-publishing-maven-plugin</artifactId>
          <version>0.8.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>3.2.8</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>${spotless.action}</goal>
            </goals>
          </execution>
        </executions>
        <inherited>true</inherited>
        <configuration>
          <skip>${spotless.skip}</skip>
          <java>
            <palantirJavaFormat>
              <version>2.61.0</version>
            </palantirJavaFormat>
            <licenseHeader>
              <file>${maven.multiModuleProjectDirectory}/license_header.txt</file>
            </licenseHeader>
          </java>
          <upToDateChecking>
            <enabled>true</enabled>
            <indexFile>${project.basedir}/.spotless-index</indexFile>
          </upToDateChecking>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.github.ekryd.sortpom</groupId>
        <artifactId>sortpom-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>${sortpom.action}</goal>
            </goals>
          </execution>
        </executions>
        <inherited>true</inherited>
        <configuration>
          <encoding>UTF-8</encoding>
          <keepBlankLines>true</keepBlankLines>
          <spaceBeforeCloseEmptyElement>false</spaceBeforeCloseEmptyElement>
          <createBackupFile>false</createBackupFile>
          <lineSeparator>\n</lineSeparator>
          <verifyFail>stop</verifyFail>
          <verifyFailOn>strict</verifyFailOn>
          <skip>${sortpom.skip}</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>flatten</id>
            <phase>process-resources</phase>
            <goals>
              <goal>flatten</goal>
            </goals>
          </execution>
          <execution>
            <id>flatten.clean</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <updatePomFile>true</updatePomFile>
          <flattenMode>resolveCiFriendliesOnly</flattenMode>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <publishingServerId>central</publishingServerId>
          <deploymentName>Tileverse Range Reader</deploymentName>
          <autoPublish>true</autoPublish>
          <waitUntil>published</waitUntil>
          <excludeArtifacts>
            <excludeArtifact>tileverse-rangereader-benchmarks</excludeArtifact>
          </excludeArtifacts>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-gpg-plugin</artifactId>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
            <configuration>
              <skip>${gpg.skip}</skip>
              <gpgArguments>
                <arg>--pinentry-mode</arg>
                <arg>loopback</arg>
              </gpgArguments>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>qa</id>
      <activation>
        <property>
          <name>qa</name>
        </property>
      </activation>
      <properties>
        <spotless.action>check</spotless.action>
        <sortpom.action>verify</sortpom.action>
        <sortpom.verifyFailOn>strict</sortpom.verifyFailOn>
        <sortpom.verifyFail>stop</sortpom.verifyFail>
      </properties>
    </profile>
    <profile>
      <id>eclipse-integration</id>
      <activation>
        <property>
          <name>m2e.version</name>
        </property>
      </activation>
      <properties>
        <spotless.skip>true</spotless.skip>
        <sortpom.skip>true</sortpom.skip>
      </properties>
    </profile>
  </profiles>
</project>
