<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">
<!--
Copyright 2022 VMware, Inc.
SPDX-License-Identifier: MIT

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>net.hydromatic</groupId>
    <artifactId>parent</artifactId>
    <version>0.1</version>
  </parent>

  <artifactId>sql-logic-test</artifactId>
  <version>0.3</version>
  <packaging>jar</packaging>

  <!-- More project information. -->
  <name>SQL Logic Test</name>
  <description>SQL Logic Test template for Java/Maven projects</description>
  <url>https://github.com/hydromatic/sql-logic-test</url>
  <inceptionYear>2023</inceptionYear>
  <organization>
    <name>Julian Hyde</name>
    <url>http://www.hydromatic.net</url>
  </organization>
  <licenses>
    <license>
      <name>The MIT License</name>
      <url>https://opensource.org/licenses/MIT</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>julianhyde</id>
      <name>Julian Hyde</name>
      <email>jhyde@apache.org</email>
      <url>https://github.com/julianhyde</url>
      <roles>
        <role>architect</role>
        <role>developer</role>
      </roles>
      <timezone>-8</timezone>
      <properties />
    </developer>
  </developers>

  <mailingLists>
    <mailingList>
      <name>Apache Calcite developers list</name>
      <subscribe>dev-subscribe@calcite.apache.org</subscribe>
      <unsubscribe>dev-unsubscribe@calcite.apache.org</unsubscribe>
      <post>dev@calcite.apache.org</post>
      <archive>https://mail-archives.apache.org/mod_mbox/calcite-dev</archive>
    </mailingList>
  </mailingLists>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <top.dir>${project.basedir}</top.dir>

    <!-- Component and plugin versions, in alphabetical order. -->
    <build-helper-maven-plugin.version>3.4.0</build-helper-maven-plugin.version>
    <checkerframework.version>3.35.0</checkerframework.version>
    <!-- We support checkstyle 9.3 and higher; 10.0 requires JDK 11 or higher. -->
    <checkstyle.version>10.12.0</checkstyle.version>
    <git-commit-id-plugin.version>4.9.10</git-commit-id-plugin.version>
    <hamcrest.version>2.2</hamcrest.version>
    <hsqldb.version>2.7.2</hsqldb.version>
    <jcommander.version>1.82</jcommander.version>
    <junit-jupiter.version>5.9.3</junit-jupiter.version>
    <maven-checkstyle-plugin.version>3.3.0</maven-checkstyle-plugin.version>
    <maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
    <maven-dependency-plugin.version>3.6.0</maven-dependency-plugin.version>
    <maven-enforcer-plugin.version>3.3.0</maven-enforcer-plugin.version>
    <maven-gpg-plugin.version>3.1.0</maven-gpg-plugin.version>
    <maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>
    <maven-javadoc-plugin.additionalOptions>-html5</maven-javadoc-plugin.additionalOptions>
    <maven-site-plugin.version>3.12.1</maven-site-plugin.version>
    <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
    <maven-failsafe-plugin.version>3.1.2</maven-failsafe-plugin.version>
    <maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
    <postgresql.version>42.6.0</postgresql.version>
    <reflections.version>0.10.2</reflections.version>
  </properties>

  <!-- Environment settings. -->
  <distributionManagement>
    <site>
      <id>sql-logic-test.website</id>
      <name>SQL Logic Test Website</name>
      <url>file:/home/jhyde/web/sql-logic-test</url>
    </site>
  </distributionManagement>

  <issueManagement>
    <system>github</system>
    <url>https://github.com/hydromatic/sql-logic-test/issues</url>
  </issueManagement>

  <scm>
    <connection>scm:git:git://github.com/hydromatic/sql-logic-test.git</connection>
    <developerConnection>scm:git:git@github.com:hydromatic/sql-logic-test.git</developerConnection>
    <url>https://github.com/hydromatic/sql-logic-test/tree/main</url>
    <tag>sql-logic-test-0.3</tag>
  </scm>

  <repositories>
    <repository>
      <id>central</id>
      <url>https://repo.maven.apache.org/maven2</url>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>org.checkerframework</groupId>
      <artifactId>checker-qual</artifactId>
      <version>${checkerframework.version}</version>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest</artifactId>
      <version>${hamcrest.version}</version>
      <scope>test</scope>
    </dependency>
    <!-- HyperSQL Java database -->
    <dependency>
      <groupId>org.hsqldb</groupId>
      <artifactId>hsqldb</artifactId>
      <version>${hsqldb.version}</version>
      <classifier>jdk8</classifier>
      <scope>runtime</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>${junit-jupiter.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>${junit-jupiter.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <version>${junit-jupiter.version}</version>
      <scope>test</scope>
    </dependency>
    <!-- The following is necessary only if you want to use the JDBC Postgres
         driver for testing. -->
    <dependency>
      <groupId>org.postgresql</groupId>
      <artifactId>postgresql</artifactId>
      <version>${postgresql.version}</version>
      <scope>runtime</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.reflections</groupId>
      <artifactId>reflections</artifactId>
      <version>${reflections.version}</version>
    </dependency>
  </dependencies>

  <build>
    <!-- See parent POM -->
    <pluginManagement />

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven-javadoc-plugin.version}</version>
        <configuration>
          <additionalOptions>${maven-javadoc-plugin.additionalOptions}</additionalOptions>
          <show>public</show>
          <links>
            <link>https://docs.oracle.com/en/java/javase/17/docs/api/</link>
          </links>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>${maven-site-plugin.version}</version>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>${maven-dependency-plugin.version}</version>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>build-classpath</goal>
            </goals>
            <configuration>
              <outputProperty>maven.compile.classpath</outputProperty>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>${maven-source-plugin.version}</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>verify</phase>
            <goals>
              <goal>jar-no-fork</goal>
              <goal>test-jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven-compiler-plugin.version}</version>
        <configuration>
          <source>8</source>
          <target>8</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>${maven-checkstyle-plugin.version}</version>
        <executions>
          <execution>
            <id>validate</id>
            <phase>validate</phase>
            <configuration>
              <configLocation>${top.dir}/src/main/config/checkstyle/checker.xml</configLocation>
              <suppressionsLocation>${top.dir}/src/main/config/checkstyle/suppressions.xml</suppressionsLocation>
              <consoleOutput>true</consoleOutput>
              <headerLocation>${top.dir}/src/main/config/checkstyle/header.txt</headerLocation>
              <failOnViolation>true</failOnViolation>
              <includeTestSourceDirectory>true</includeTestSourceDirectory>
            </configuration>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>com.puppycrawl.tools</groupId>
            <artifactId>checkstyle</artifactId>
            <version>${checkstyle.version}</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>${maven-enforcer-plugin.version}</version>
        <executions>
          <execution>
            <id>enforce-java</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireJavaVersion>
                  <version>[1.8,)</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
          <execution>
            <id>enforce-maven</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <!-- prerequisite of some plugins -->
                  <version>[3.2.1,)</version>
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>${build-helper-maven-plugin.version}</version>
        <!-- Make sure every sub-project has LICENSE, NOTICE and
             git.properties in its jar's META-INF directory. -->
        <executions>
          <execution>
            <id>add-resource</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>add-resource</goal>
              <goal>add-test-resource</goal>
            </goals>
            <configuration>
              <resources>
                <resource>
                  <directory>${top.dir}</directory>
                  <targetPath>META-INF</targetPath>
                  <includes>
                    <include>LICENSE</include>
                    <include>NOTICE</include>
                  </includes>
                </resource>
                <resource>
                  <directory>${top.dir}/target</directory>
                  <targetPath>META-INF</targetPath>
                  <includes>
                    <include>git.properties</include>
                  </includes>
                </resource>
                <resource>
                  <directory>${project.basedir}/src/main/resources</directory>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>pl.project13.maven</groupId>
        <artifactId>git-commit-id-plugin</artifactId>
        <version>${git-commit-id-plugin.version}</version>
        <inherited>false</inherited>
        <executions>
          <execution>
            <goals>
              <goal>revision</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <dateFormat>yyyy-MM-dd'T'HH:mm:ssZ</dateFormat>
          <verbose>false</verbose>
          <skipPoms>false</skipPoms>
          <generateGitPropertiesFile>true</generateGitPropertiesFile>
          <generateGitPropertiesFilename>target/git.properties</generateGitPropertiesFilename>
          <failOnNoGitDirectory>false</failOnNoGitDirectory>
          <failOnUnableToExtractRepoInfo>false</failOnUnableToExtractRepoInfo>
          <gitDescribe>
            <skip>false</skip>
            <always>false</always>
            <abbrev>7</abbrev>
            <dirty>-dirty</dirty>
            <forceLongFormat>true</forceLongFormat>
          </gitDescribe>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>${maven-gpg-plugin.version}</version>
        <configuration>
          <useAgent>true</useAgent>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven-surefire-plugin.version}</version>
        <configuration>
          <useManifestOnlyJar>false</useManifestOnlyJar>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>${maven-failsafe-plugin.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <systemPropertyVariables>
            <buildDirectory>${project.build.directory}</buildDirectory>
            <artifactName>${project.build.finalName}.jar</artifactName>
            <buildClasspath>${maven.compile.classpath}</buildClasspath>
          </systemPropertyVariables>
        </configuration>
      </plugin>
    </plugins>

    <resources>
      <resource>
        <directory>${top.dir}</directory>
        <targetPath>META-INF</targetPath>
        <includes>
          <include>LICENSE</include>
          <include>NOTICE</include>
        </includes>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <directory>${project.basedir}/src/test/resources</directory>
      </testResource>
      <testResource>
        <directory>${project.basedir}/src/main/resources</directory>
      </testResource>
    </testResources>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven-javadoc-plugin.version}</version>
        <configuration>
          <additionalOptions>${maven-javadoc-plugin.additionalOptions}</additionalOptions>
          <show>public</show>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>java8</id>
      <activation>
        <jdk>1.8</jdk>
      </activation>
      <properties>
        <!-- Javadoc only has a "-html5" flag in JDK 9 and higher. -->
        <maven-javadoc-plugin.additionalOptions />
      </properties>
    </profile>
  </profiles>
</project>
