<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
  license agreements. See the NOTICE file distributed with this work for additional
  information regarding copyright ownership. The ASF licenses this file to
  You under the Apache License, Version 2.0 (the "License"); you may not use
  this file except in compliance with the License. You may obtain a copy of
  the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
  by applicable law or agreed to in writing, software distributed under the
  License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
  OF ANY KIND, either express or implied. See the License for the specific
  language governing permissions and limitations under the License. -->
<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>org.apache</groupId>
    <artifactId>apache</artifactId>
    <version>18</version>
  </parent>

  <groupId>org.apache.arrow.adbc</groupId>
  <artifactId>arrow-adbc-java-root</artifactId>
  <version>0.12.0</version>
  <packaging>pom</packaging>

  <name>Apache Arrow ADBC Java Root POM</name>
  <description>Apache Arrow is open source, in-memory columnar data structures and low-overhead messaging</description>
  <url>https://arrow.apache.org/</url>

  <properties>
    <dep.arrow.version>15.0.0</dep.arrow.version>
    <adbc.version>0.12.0</adbc.version>
  </properties>

  <scm>
    <connection>scm:git:https://github.com/apache/arrow-adbc.git</connection>
    <developerConnection>scm:git:https://github.com/apache/arrow-adbc.git</developerConnection>
    <url>https://github.com/apache/arrow-adbc</url>
  </scm>

  <mailingLists>
    <mailingList>
      <name>Developer List</name>
      <subscribe>dev-subscribe@arrow.apache.org</subscribe>
      <unsubscribe>dev-unsubscribe@arrow.apache.org</unsubscribe>
      <post>dev@arrow.apache.org</post>
      <archive>https://mail-archives.apache.org/mod_mbox/arrow-dev/</archive>
    </mailingList>
    <mailingList>
      <name>Commits List</name>
      <subscribe>commits-subscribe@arrow.apache.org</subscribe>
      <unsubscribe>commits-unsubscribe@arrow.apache.org</unsubscribe>
      <post>commits@arrow.apache.org</post>
      <archive>https://mail-archives.apache.org/mod_mbox/arrow-commits/</archive>
    </mailingList>
    <mailingList>
      <name>Issues List</name>
      <subscribe>issues-subscribe@arrow.apache.org</subscribe>
      <unsubscribe>issues-unsubscribe@arrow.apache.org</unsubscribe>
      <archive>https://mail-archives.apache.org/mod_mbox/arrow-issues/</archive>
    </mailingList>
  </mailingLists>

  <distributionManagement>
    <repository>
      <id>fury</id>
      <name>Fury</name>
      <url>https://maven.fury.io/arrow-adbc-nightlies/</url>
    </repository>
    <snapshotRepository>
      <id>fury</id>
      <name>Fury</name>
      <url>https://maven.fury.io/arrow-adbc-nightlies/</url>
    </snapshotRepository>
  </distributionManagement>

  <issueManagement>
    <system>Jira</system>
    <url>https://issues.apache.org/jira/browse/arrow</url>
  </issueManagement>

  <modules>
    <module>core</module>
    <module>driver/flight-sql</module>
    <module>driver/flight-sql-validation</module>
    <module>driver/jdbc</module>
    <module>driver/jdbc-validation-derby</module>
    <module>driver/jdbc-validation-mssqlserver</module>
    <module>driver/jdbc-validation-postgresql</module>
    <module>driver/validation</module>
    <module>driver-manager</module>
    <module>sql</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <!-- Arrow -->
      <dependency>
        <groupId>org.apache.arrow</groupId>
        <artifactId>arrow-bom</artifactId>
        <version>${dep.arrow.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <!-- ADBC -->
      <dependency>
        <groupId>org.apache.arrow.adbc</groupId>
        <artifactId>adbc-core</artifactId>
        <version>${adbc.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.arrow.adbc</groupId>
        <artifactId>adbc-driver-flight-sql</artifactId>
        <version>${adbc.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.arrow.adbc</groupId>
        <artifactId>adbc-driver-jdbc</artifactId>
        <version>${adbc.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.arrow.adbc</groupId>
        <artifactId>adbc-driver-validation</artifactId>
        <version>${adbc.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.arrow.adbc</groupId>
        <artifactId>adbc-driver-manager</artifactId>
        <version>${adbc.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.arrow.adbc</groupId>
        <artifactId>adbc-sql</artifactId>
        <version>${adbc.version}</version>
      </dependency>

      <!-- Linting and static analysis -->
      <dependency>
        <groupId>org.checkerframework</groupId>
        <artifactId>checker-qual</artifactId>
        <version>3.43.0</version>
      </dependency>

      <!-- Testing -->
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>3.25.3</version>
      </dependency>
      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>5.10.2</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.2.5</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.13.0</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <executions>
          <execution>
            <id>rat-checks</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <excludeSubProjects>false</excludeSubProjects>
          <excludes>
            <exclude>**/*.iml</exclude>
            <exclude>**/*.log</exclude>
            <exclude>**/target/**</exclude>
            <exclude>.mvn/jvm.config</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <!-- Will only work with JDK 17 (JDK 21 is broken and JDK 8 emits the
             wrong stylesheet) -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.6.3</version>
        <configuration>
          <!-- Ignore missing @return, @throws -->
          <doclint>all,-missing</doclint>
          <links>
            <link>https://arrow.apache.org/docs/java/reference/</link>
          </links>
	  <!-- Stop it from trying to document the tests -->
          <release>8</release>
	  <show>public</show>
          <source>1.8</source>
        </configuration>
        <reportSets>
          <reportSet>
            <id>aggregate</id>
            <inherited>false</inherited>
            <reports>
              <report>aggregate</report>
            </reports>
          </reportSet>
          <reportSet>
            <id>default</id>
            <reports>
              <report>javadoc</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>jdk8</id>
      <activation>
        <jdk>8</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>jdk9+</id>
      <activation>
        <jdk>[9,]</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <argLine>
                --add-opens=java.base/java.nio=ALL-UNNAMED
              </argLine>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>errorprone</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.13.0</version>
            <configuration>
              <source>1.8</source>
              <target>1.8</target>
              <encoding>UTF-8</encoding>
              <compilerArgs combine.children="append">
                <arg>-XDcompilePolicy=simple</arg>
                <arg>-Xplugin:ErrorProne -Xep:NullAway:ERROR -XepOpt:NullAway:AnnotatedPackages=com.uber</arg>

                <arg>-Xmaxerrs</arg> <!-- javac only reports the first 100 errors or warnings -->
                <arg>10000</arg>
                <arg>-Xmaxwarns</arg>
                <arg>10000</arg>
                <arg>-AskipDefs=.*Test</arg> <!-- Skip analysis for Testing classes -->
                <arg>-AatfDoNotCache</arg> <!-- not cache results -->
		<arg>-AprintVerboseGenerics</arg>
		<arg>-AprintAllQualifiers</arg>
		<arg>-Astubs=.checker-framework/:stubs</arg>
              </compilerArgs>
              <annotationProcessorPaths combine.children="append">
                <path>
                  <groupId>com.google.errorprone</groupId>
                  <artifactId>error_prone_core</artifactId>
                  <version>2.27.1</version>
                </path>
                <path>
                  <groupId>com.uber.nullaway</groupId>
                  <artifactId>nullaway</artifactId>
                  <version>0.10.26</version>
                </path>
                <path>
                  <groupId>org.checkerframework</groupId>
                  <artifactId>checker</artifactId>
                  <version>3.43.0</version>
                </path>
              </annotationProcessorPaths>
              <annotationProcessors>
                <annotationProcessor>org.checkerframework.checker.nullness.NullnessChecker</annotationProcessor>
              </annotationProcessors>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
