<?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.1.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>10.0.0</dep.arrow.version>
    <adbc.version>0.1.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-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-jdbc</artifactId>
        <version>${dep.arrow.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.arrow</groupId>
        <artifactId>arrow-memory-core</artifactId>
        <version>${dep.arrow.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.arrow</groupId>
        <artifactId>arrow-vector</artifactId>
        <version>${dep.arrow.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.arrow</groupId>
        <artifactId>flight-core</artifactId>
        <version>${dep.arrow.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.arrow</groupId>
        <artifactId>flight-sql</artifactId>
        <version>${dep.arrow.version}</version>
      </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>

      <!-- Testing -->
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>3.23.1</version>
      </dependency>
      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>5.8.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.0.0-M7</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.10.1</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>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.4.1</version>
        <configuration>
          <!-- Stop it from trying to document the tests -->
          <additionalOptions>-package</additionalOptions>
          <!-- Ignore missing @return, @throws -->
          <doclint>all,-missing</doclint>
          <links>
            <link>https://arrow.apache.org/docs/java/reference/</link>
          </links>
          <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>
  </profiles>
</project>
