<?xml version="1.0" encoding="UTF-8"?>
<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>

    <parent>
        <groupId>io.airlift</groupId>
        <artifactId>airbase</artifactId>
        <version>424</version>
        <relativePath />
    </parent>

    <groupId>io.trino.epsg</groupId>
    <artifactId>epsg-catalog-root</artifactId>
    <version>1</version>
    <packaging>pom</packaging>

    <name>${project.artifactId}</name>
    <description>EPSG catalog generator and runtime loader</description>
    <url>https://github.com/trinodb/epsg-catalog</url>
    <inceptionYear>2026</inceptionYear>

    <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>Trino contributors</name>
            <url>https://github.com/trinodb/epsg-catalog/graphs/contributors</url>
        </developer>
    </developers>

    <modules>
        <module>epsg-catalog</module>
        <module>epsg-catalog-generator</module>
    </modules>

    <scm>
        <connection>scm:git:https://github.com/trinodb/epsg-catalog.git</connection>
        <developerConnection>scm:git:https://github.com/trinodb/epsg-catalog.git</developerConnection>
        <tag>1</tag>
        <url>https://github.com/trinodb/epsg-catalog</url>
    </scm>

    <properties>
        <project.build.targetJdk>25</project.build.targetJdk>

        <dep.sis.version>1.7</dep.sis.version>

        <air.check.skip-pmd>true</air.check.skip-pmd>
        <air.compiler.fail-warnings>true</air.compiler.fail-warnings>
        <air.java.version>25</air.java.version>

        <!-- Publish releases to Maven Central through Njord -->
        <air.repository.release.url>njord:template:release-sca</air.repository.release.url>
        <njord.publisher>sonatype-cp</njord.publisher>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.airlift</groupId>
                <artifactId>aircompressor-v3</artifactId>
                <version>3.14</version>
            </dependency>

            <dependency>
                <groupId>io.airlift</groupId>
                <artifactId>junit-extensions</artifactId>
                <version>2</version>
            </dependency>

            <dependency>
                <groupId>org.apache.sis.core</groupId>
                <artifactId>sis-referencing</artifactId>
                <version>${dep.sis.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.sis.non-free</groupId>
                <artifactId>sis-embedded-data</artifactId>
                <version>${dep.sis.version}</version>
            </dependency>

            <dependency>
                <groupId>org.opengis</groupId>
                <artifactId>geoapi</artifactId>
                <version>3.0.2</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <systemPropertyVariables>
                            <junit.jupiter.extensions.autodetection.enabled>true</junit.jupiter.extensions.autodetection.enabled>
                        </systemPropertyVariables>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>3.7.0</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <!-- Error Prone needs the javac exports below, which apply only to a forked compiler: https://errorprone.info/docs/installation#maven -->
                    <fork>true</fork>
                    <compilerArgs combine.children="append">
                        <arg>-XDcompilePolicy=simple</arg>
                        <arg>--should-stop=ifError=FLOW</arg>
                        <arg>-Xplugin:ErrorProne</arg>
                        <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
                        <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
                        <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
                        <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
                        <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
                        <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
                        <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
                        <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
                        <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
                        <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
                    </compilerArgs>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>com.google.errorprone</groupId>
                            <artifactId>error_prone_core</artifactId>
                            <version>${dep.errorprone.version}</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
