<?xml version="1.0"?>
<!--
Licensed to Julian Hyde under one or more contributor license
agreements.  See the NOTICE file distributed with this work
for additional information regarding copyright ownership.
Julian Hyde 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>net.hydromatic</groupId>
    <artifactId>parent</artifactId>
    <version>0.1</version>
  </parent>

  <artifactId>morel</artifactId>
  <version>0.3.0</version>
  <packaging>jar</packaging>

  <name>morel</name>
  <description>Standard ML interpreter, with relational extensions, implemented in Java</description>
  <url>https://github.com/hydromatic/morel</url>
  <inceptionYear>2019</inceptionYear>
  <organization>
    <name>Julian Hyde</name>
    <url>https://www.hydromatic.net</url>
  </organization>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</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.3.0</build-helper-maven-plugin.version>
    <calcite.version>1.32.0</calcite.version>
    <!-- We support (and test) Checkstyle as low as 9.3.
         In JDK 8, you must add '-Dcheckstyle.version=9.3' because
         Checkstyle 10 requires JDK 11 or higher. -->
    <checkstyle.version>10.3.4</checkstyle.version>
    <findbugs.version>3.0.2</findbugs.version>
    <foodmart-data-hsqldb.version>0.5</foodmart-data-hsqldb.version>
    <git-commit-id-plugin.version>4.9.10</git-commit-id-plugin.version>
    <!-- We support (and test) Guava as low as 19. -->
    <guava.version>31.1-jre</guava.version>
    <hamcrest.version>2.2</hamcrest.version>
    <!-- We support (and test) HSQLDB as low as 2.5.1.
         In JDK 8, you must add '-Dhsqldb.version=2.5.1' because
         HSQLDB 2.7.0 requires JDK 11 or higher. -->
    <hsqldb.version>2.7.0</hsqldb.version>
    <java-diff.version>1.1.2</java-diff.version>
    <javacc-maven-plugin.version>3.0.3</javacc-maven-plugin.version>
    <javacc.version>7.0.12</javacc.version>
    <jline.version>3.21.0</jline.version>
    <junit-jupiter.version>5.9.1</junit-jupiter.version>
    <maven-checkstyle-plugin.version>3.2.0</maven-checkstyle-plugin.version>
    <maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
    <maven-enforcer-plugin.version>3.1.0</maven-enforcer-plugin.version>
    <maven-javadoc-plugin.version>3.4.1</maven-javadoc-plugin.version>
    <maven-project-info-reports-plugin.version>3.4.1</maven-project-info-reports-plugin.version>
    <maven-release-plugin.version>2.4.2</maven-release-plugin.version>
    <maven-scm-provider-gitexe.version>1.9.1</maven-scm-provider-gitexe.version>
    <maven-site-plugin.version>3.12.1</maven-site-plugin.version>
    <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
    <maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
    <scott-data-hsqldb.version>0.2</scott-data-hsqldb.version>
    <slf4j.version>2.0.3</slf4j.version>

    <maven-javadoc-plugin.additionalOptions>-html5</maven-javadoc-plugin.additionalOptions>
    <maven-javadoc-plugin.excludePackageNames>net.hydromatic.morel.parse</maven-javadoc-plugin.excludePackageNames>
    <maven-javadoc-plugin.link>https://docs.oracle.com/javase/11/docs/api/</maven-javadoc-plugin.link>
  </properties>

  <!-- Environment settings. -->
  <distributionManagement>
    <site>
      <id>morel.website</id>
      <name>morel web site</name>
      <url>file:/home/jhyde/web2/morel</url>
    </site>
  </distributionManagement>

  <issueManagement>
    <system>github</system>
    <url>https://github.com/hydromatic/morel/issues</url>
  </issueManagement>

  <scm>
    <connection>scm:git:git://github.com/hydromatic/morel.git</connection>
    <developerConnection>scm:git:git@github.com:hydromatic/morel.git</developerConnection>
    <url>scm:git:git://github.com/hydromatic/morel.git</url>
    <tag>morel-0.3.0</tag>
  </scm>

  <dependencies>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <version>${findbugs.version}</version>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>${guava.version}</version>
    </dependency>
    <dependency>
      <groupId>net.hydromatic</groupId>
      <artifactId>foodmart-data-hsqldb</artifactId>
      <version>${foodmart-data-hsqldb.version}</version>
    </dependency>
    <dependency>
      <groupId>net.hydromatic</groupId>
      <artifactId>scott-data-hsqldb</artifactId>
      <version>${scott-data-hsqldb.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.calcite</groupId>
      <artifactId>calcite-core</artifactId>
      <version>${calcite.version}</version>
    </dependency>
    <dependency>
      <groupId>org.hsqldb</groupId>
      <artifactId>hsqldb</artifactId>
      <version>${hsqldb.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jline</groupId>
      <artifactId>jline</artifactId>
      <version>${jline.version}</version>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-core</artifactId>
      <version>${hamcrest.version}</version>
    </dependency>
    <dependency>
      <groupId>org.incava</groupId>
      <artifactId>java-diff</artifactId>
      <version>${java-diff.version}</version>
      <scope>test</scope>
    </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>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j.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>
        <!-- This is the configuration used by "mvn javadoc:javadoc". It is
             configured strict, so that it shows errors such as broken links in
             javadoc on private methods. The configuration for "mvn site" is
             under "reporting", and is more lenient. -->
        <configuration>
          <source>8</source>
          <links>
            <link>${maven-javadoc-plugin.link}</link>
          </links>
          <notimestamp>true</notimestamp>
          <excludePackageNames>${maven-javadoc-plugin.excludePackageNames}</excludePackageNames>
          <quiet>true</quiet>
          <show>private</show>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>${maven-project-info-reports-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>${maven-site-plugin.version}</version>
      </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.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>${maven-release-plugin.version}</version>
        <!-- If we don't specify gitexe version, git doesn't
             commit during release process. -->
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-provider-gitexe</artifactId>
            <version>${maven-scm-provider-gitexe.version}</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven-surefire-plugin.version}</version>
      </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>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.javacc.plugin</groupId>
        <artifactId>javacc-maven-plugin</artifactId>
        <version>${javacc-maven-plugin.version}</version>
        <dependencies>
          <dependency>
            <groupId>net.java.dev.javacc</groupId>
            <artifactId>javacc</artifactId>
            <version>${javacc.version}</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <id>javacc</id>
            <goals>
              <goal>javacc</goal>
            </goals>
            <configuration>
              <includes>
                <include>**/MorelParser.jj</include>
              </includes>
              <lookAhead>1</lookAhead>
              <isStatic>false</isStatic>
            </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>
          <gitDescribe>
            <skip>false</skip>
            <always>false</always>
            <abbrev>7</abbrev>
            <dirty>-dirty</dirty>
            <forceLongFormat>true</forceLongFormat>
          </gitDescribe>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven-javadoc-plugin.version}</version>
        <configuration>
          <source>8</source>
          <links>
            <link>${maven-javadoc-plugin.link}</link>
          </links>
          <notimestamp>true</notimestamp>
          <excludePackageNames>${maven-javadoc-plugin.excludePackageNames}</excludePackageNames>
          <quiet>true</quiet>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>java8</id>
      <activation>
        <jdk>1.8</jdk>
      </activation>
      <properties>
        <!-- Java 1.8 does not support -html5, so we pass another harmless option -->
        <maven-javadoc-html5>-notimestamp</maven-javadoc-html5>
      </properties>
    </profile>
  </profiles>
</project>
