<?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</groupId>
  <artifactId>tileverse-parent</artifactId>
  <version>1.3.3</version>
  <packaging>pom</packaging>
  <name>Tileverse</name>
  <description>Cloud-optimized Java libraries for efficient access to tiled geospatial data from local files, HTTP servers, and cloud storage (S3, Azure, GCS). Includes Range Reader for byte-range access, PMTiles format support, Mapbox Vector Tiles encoding/decoding, and OGC Tile Matrix Set implementation.</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>bom</module>
    <module>tileverse-rangereader</module>
    <module>tileverse-vectortiles</module>
    <module>tileverse-tilematrixset</module>
    <module>tileverse-pmtiles</module>
  </modules>
  <scm>
    <connection>scm:git:https://github.com/tileverse-io/tileverse.git</connection>
    <developerConnection>scm:git:https://github.com/tileverse-io/tileverse.git</developerConnection>
    <url>https://github.com/tileverse-io/tileverse</url>
  </scm>
  <issueManagement>
    <system>GitHub Issues</system>
    <url>https://github.com/tileverse-io/tileverse/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>
    <protobuf-java.version>4.33.1</protobuf-java.version>
    <slf4j-api.version>2.0.17</slf4j-api.version>
    <jackson.version>3.1.0</jackson.version>
    <spotless.skip>${fmt.skip}</spotless.skip>
    <zstd-jni.version>1.5.7-6</zstd-jni.version>
    <failsafe.skip>false</failsafe.skip>
    <assertj.version>3.27.3</assertj.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <surefire.skip>false</surefire.skip>
    <junit.version>5.13.2</junit.version>
    <gpg.skip>true</gpg.skip>
    <sortpom.action>sort</sortpom.action>
    <commons-io.version>2.21.0</commons-io.version>
    <logback.version>1.5.18</logback.version>
    <caffeine.version>3.2.3</caffeine.version>
    <spotless.action>apply</spotless.action>
    <mockito.version>5.18.0</mockito.version>
    <palantirJavaFormat.version>2.73.0</palantirJavaFormat.version>
    <commons-compress.version>1.28.0</commons-compress.version>
    <jacoco.version>0.8.13</jacoco.version>
    <fmt.skip>false</fmt.skip>
    <revision>1.3-SNAPSHOT</revision>
    <lombok.version>1.18.42</lombok.version>
    <jts.version>1.20.0</jts.version>
    <cloud-dependencies-bom.version>1.0.1</cloud-dependencies-bom.version>
    <testcontainers.version>1.21.4</testcontainers.version>
    <awaitility.version>4.3.0</awaitility.version>
    <sortpom.skip>${fmt.skip}</sortpom.skip>
    <argLine></argLine>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.tileverse</groupId>
        <artifactId>cloud-dependencies-bom</artifactId>
        <version>${cloud-dependencies-bom.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>tools.jackson</groupId>
        <artifactId>jackson-bom</artifactId>
        <version>${jackson.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j-api.version}</version>
      </dependency>
      <dependency>
        <groupId>com.github.ben-manes.caffeine</groupId>
        <artifactId>caffeine</artifactId>
        <version>${caffeine.version}</version>
      </dependency>
      <dependency>
        <groupId>org.locationtech.jts</groupId>
        <artifactId>jts-core</artifactId>
        <version>${jts.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.protobuf</groupId>
        <artifactId>protobuf-javalite</artifactId>
        <version>${protobuf-java.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-compress</artifactId>
        <version>${commons-compress.version}</version>
      </dependency>
      <dependency>
        <groupId>com.github.luben</groupId>
        <artifactId>zstd-jni</artifactId>
        <version>${zstd-jni.version}</version>
      </dependency>
      <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>
  <dependencies>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.wiremock</groupId>
      <artifactId>wiremock-standalone</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.awaitility</groupId>
      <artifactId>awaitility</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <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>
                  <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>
            <skip>${surefire.skip}</skip>
            <argLine>@{argLine} --enable-native-access=ALL-UNNAMED --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>
            <skip>${failsafe.skip}</skip>
            <argLine>@{argLine} --enable-native-access=ALL-UNNAMED --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-deploy-plugin</artifactId>
          <version>3.1.4</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>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco.version}</version>
          <executions>
            <execution>
              <id>prepare-agent</id>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
            </execution>
            <execution>
              <id>prepare-agent-integration</id>
              <goals>
                <goal>prepare-agent-integration</goal>
              </goals>
            </execution>
            <execution>
              <id>report</id>
              <phase>test</phase>
              <goals>
                <goal>report</goal>
              </goals>
            </execution>
            <execution>
              <id>report-integration</id>
              <phase>post-integration-test</phase>
              <goals>
                <goal>report-integration</goal>
              </goals>
            </execution>
          </executions>
        </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>
        <configuration>
          <doclint>all,-missing</doclint>
          <detectLinks>false</detectLinks>
          <detectOfflineLinks>false</detectOfflineLinks>
        </configuration>
      </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>${palantirJavaFormat.version}</version>
            </palantirJavaFormat>
            <indent>
              <spaces>true</spaces>
              <spacesPerTab>4</spacesPerTab>
            </indent>
            <trimTrailingWhitespace></trimTrailingWhitespace>
            <endWithNewline></endWithNewline>
          </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</deploymentName>
          <autoPublish>true</autoPublish>
          <waitUntil>published</waitUntil>
          <excludeArtifacts>
            <excludeArtifact>tileverse-coverage-report</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>dependencyConvergence</id>
      <activation>
        <property>
          <name>!skipDependencyConvergence</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-enforcer-plugin</artifactId>
            <executions>
              <execution>
                <id>enforce-dependency-convergence</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <dependencyConvergence>
                      <excludedScopes>test</excludedScopes>
                    </dependencyConvergence>
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <dependencyManagement>
        <dependencies>
          <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.19.0</version>
          </dependency>
        </dependencies>
      </dependencyManagement>
    </profile>
    <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>coverage</id>
      <activation>
        <property>
          <name>coverage</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
      <modules>
        <module>coverage-report</module>
      </modules>
    </profile>
  </profiles>
</project>
