<?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>com.linkedin.calcite</groupId>
    <artifactId>calcite</artifactId>
    <version>1.21.0.265</version>
  </parent>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <artifactId>calcite-core</artifactId>
  <packaging>jar</packaging>
  <version>1.21.0.265</version>
  <name>Calcite Core</name>
  <description>Core Calcite APIs and engine.</description>

  <developers>
    <developer>
      <name>Apache Calcite developers list</name>
      <email>dev@calcite.apache.org</email>
      <organization>Apache Calcite</organization>
      <organizationUrl>https://calcite.apache.org</organizationUrl>
    </developer>
    <developer>
      <name>LinkedIn Contributors</name>
      <email>dali-dev@linkedin.com</email>
      <organization>LinkedIn</organization>
      <organizationUrl>https://linkedin.com</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git://github.com/linkedin/linkedin-calcite.git</connection>
    <developerConnection>scm:git:ssh://github.com:linkedin/linkedin-calcite.git</developerConnection>
    <url>https://github.com/linkedin/linkedin-calcite/tree/li-1.21.0</url>
  </scm>

  <properties>
    <top.dir>${project.basedir}/..</top.dir>
    <build.timestamp>${maven.build.timestamp}</build.timestamp>
    <shadeBase>com.linkedin.coral.\$internal</shadeBase>
  </properties>

  <dependencies>
    <!-- Sorted by groupId, artifactId; calcite dependencies first. Put versions
         in dependencyManagement in the root POM, not here. -->
    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.calcite.avatica</groupId>
      <artifactId>avatica-core</artifactId>
    </dependency>
    <dependency>
      <groupId>com.linkedin.calcite</groupId>
      <artifactId>calcite-linq4j</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.calcite.avatica</groupId>
      <artifactId>avatica-server</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-dbcp2</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-pool2</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.esri.geometry</groupId>
      <artifactId>esri-geometry-api</artifactId>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.dataformat</groupId>
      <artifactId>jackson-dataformat-yaml</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.yahoo.datasketches</groupId>
      <artifactId>sketches-core</artifactId>
    </dependency>
    <dependency>
      <groupId>com.jayway.jsonpath</groupId>
      <artifactId>json-path</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.github.stephenc.jcip</groupId>
      <artifactId>jcip-annotations</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-stdlib</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-test-junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>net.hydromatic</groupId>
      <artifactId>aggdesigner-algorithm</artifactId>
    </dependency>
    <dependency>
      <groupId>net.hydromatic</groupId>
      <artifactId>foodmart-data-hsqldb</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>net.hydromatic</groupId>
      <artifactId>foodmart-queries</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>net.hydromatic</groupId>
      <artifactId>quidem</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>net.hydromatic</groupId>
      <artifactId>scott-data-hsqldb</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.codehaus.janino</groupId>
      <artifactId>janino</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.janino</groupId>
      <artifactId>commons-compiler</artifactId>
    </dependency>
    <dependency>
      <groupId>org.hsqldb</groupId>
      <artifactId>hsqldb</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.incava</groupId>
      <artifactId>java-diff</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.postgresql</groupId>
      <artifactId>postgresql</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>sqlline</groupId>
      <artifactId>sqlline</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.drill.tools</groupId>
        <artifactId>drill-fmpp-maven-plugin</artifactId>
        <executions>
          <execution>
            <configuration>
              <config>src/main/codegen/config.fmpp</config>
              <templates>src/main/codegen/templates</templates>
            </configuration>
            <id>generate-fmpp-sources</id>
            <phase>validate</phase>
            <goals>
              <goal>generate</goal>
            </goals>
          </execution>
          <execution>
            <configuration>
              <config>src/test/codegen/config.fmpp</config>
              <templates>src/main/codegen/templates</templates>
              <output>${project.build.directory}/generated-test-sources/fmpp</output>
              <scope>test</scope>
            </configuration>
            <id>generate-fmpp-test-sources</id>
            <phase>validate</phase>
            <goals>
              <goal>generate</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jetbrains.kotlin</groupId>
        <artifactId>kotlin-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <!-- http://kotlinlang.org/docs/reference/using-maven.html#compiling-kotlin-and-java-sources
             Ensure kotlin-compile comes before maven-compiler-plugin, so Kotlin files
             can be used in Java code (this especially important so CalciteSuite.java
             can include Kotlin tests as well)
         -->
        <executions>
          <!-- Replacing default-compile as it is treated specially by maven -->
          <execution>
            <id>default-compile</id>
            <phase>none</phase>
          </execution>
          <!-- Replacing default-testCompile as it is treated specially by maven -->
          <execution>
            <id>default-testCompile</id>
            <phase>none</phase>
          </execution>
          <execution>
            <id>java-compile</id>
            <phase>compile</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
          <execution>
            <id>java-test-compile</id>
            <phase>test-compile</phase>
            <goals>
              <goal>testCompile</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <source>8</source>
          <target>8</target>
          <excludes>
            <exclude>org/apache/calcite/sql/parser/parserextensiontesting/*.java</exclude>
          </excludes>
          <generatedTestSourcesDirectory>${project.build.directory}/generated-test-sources/javacc</generatedTestSourcesDirectory>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <includes>
            <include>org/apache/calcite/test/CalciteSuite.java</include>
          </includes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>javacc-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>javacc</id>
            <goals>
              <goal>javacc</goal>
            </goals>
            <configuration>
              <sourceDirectory>${project.build.directory}/generated-sources/fmpp</sourceDirectory>
              <includes>
                <include>**/Parser.jj</include>
              </includes>
              <lookAhead>1</lookAhead>
              <isStatic>false</isStatic>
            </configuration>
          </execution>
          <execution>
            <id>javacc-test</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>javacc</goal>
            </goals>
            <configuration>
              <sourceDirectory>${project.build.directory}/generated-test-sources/fmpp</sourceDirectory>
              <outputDirectory>${project.build.directory}/generated-test-sources/javacc</outputDirectory>
              <includes>
                <include>**/Parser.jj</include>
              </includes>
              <lookAhead>1</lookAhead>
              <isStatic>false</isStatic>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>net.hydromatic</groupId>
        <artifactId>hydromatic-resource-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>generate-sources</goal>
            </goals>
            <configuration>
              <packageName>org.apache.calcite.runtime</packageName>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- Parent module has the same plugin and does the work of
           generating -sources.jar for each project. But without the
           plugin declared here, IDEs don't know the sources are
           available. -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <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-dependency-plugin</artifactId>
        <version>${maven-dependency-plugin.version}</version>
        <!-- configurations do not cascade, so all of the definition from
             ../pom.xml:build:plugin-management:plugins:plugin must be repeated in child poms -->
        <executions>
          <execution>
            <id>analyze</id>
            <goals>
              <goal>analyze-only</goal>
            </goals>
            <configuration>
              <failOnWarning>true</failOnWarning>
              <!-- ignore "unused but declared" warnings -->
              <ignoredUnusedDeclaredDependencies>
                <ignoredUnusedDeclaredDependency>com.h2database:h2</ignoredUnusedDeclaredDependency>
                <ignoredUnusedDeclaredDependency>com.oracle:ojdbc6</ignoredUnusedDeclaredDependency>
                <ignoredUnusedDeclaredDependency>mysql:mysql-connector-java</ignoredUnusedDeclaredDependency>
                <ignoredUnusedDeclaredDependency>net.hydromatic:scott-data-hsqldb</ignoredUnusedDeclaredDependency>
                <ignoredUnusedDeclaredDependency>net.hydromatic:foodmart-data-hsqldb</ignoredUnusedDeclaredDependency>
                <ignoredUnusedDeclaredDependency>org.postgresql:postgresql</ignoredUnusedDeclaredDependency>
                <ignoredUnusedDeclaredDependency>org.slf4j:slf4j-api</ignoredUnusedDeclaredDependency>
                <ignoredUnusedDeclaredDependency>org.slf4j:slf4j-log4j12</ignoredUnusedDeclaredDependency>
              </ignoredUnusedDeclaredDependencies>
              <ignoredUsedUndeclaredDependencies>
                <ignoredUsedUndeclaredDependency>org.eclipse.jetty:jetty-server</ignoredUsedUndeclaredDependency>
              </ignoredUsedUndeclaredDependencies>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.1.1</version>
        <executions>
          <execution>
            <!-- Note we produce 'shaded' and 'shaded-all' artifacts. -->
            <id>shaded</id>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <relocations>
                <relocation>
                  <pattern>com.google.protobuf</pattern>
                  <shadedPattern>com.linkedin.coral.com.google.protobuf</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.google.thirdparty</pattern>
                  <shadedPattern>com.linkedin.coral.com.google.thirdparty</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>google.protobuf</pattern>
                  <shadedPattern>com.linkedin.coral.google.protobuf</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.google.common</pattern>
                  <shadedPattern>com.linkedin.coral.com.google.common</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.fasterxml.jackson</pattern>
                  <shadedPattern>com.linkedin.coral.com.fasterxml.jackson</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.http</pattern>
                  <shadedPattern>com.linkedin.coral.org.apache.http</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.slf4j</pattern>
                  <shadedPattern>com.linkedin.coral.org.slf4j</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.esri</pattern>
                  <shadedPattern>com.linkedin.coral.com.esri</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.pentaho</pattern>
                  <shadedPattern>com.linkedin.coral.org.pentaho</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.commons.codec</pattern>
                  <shadedPattern>com.linkedin.coral.org.apache.commons.codec</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.commons.logging</pattern>
                  <shadedPattern>com.linkedin.coral.org.apache.commons.logging</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>javax.annotation</pattern>
                  <shadedPattern>com.linkedin.coral.javax.annotation</shadedPattern>
                </relocation>
              </relocations>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>mozilla/public-suffix-list.txt</exclude>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                  </excludes>
                </filter>
              </filters>
              <shadedArtifactAttached>true</shadedArtifactAttached>
              <shadedClassifierName>shaded</shadedClassifierName>
            </configuration>
          </execution>

          <execution>
            <!-- Note we produce 'shaded' and 'shaded-all' artifacts. -->
            <id>shaded-all</id>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <relocations>
                <relocation>
                  <pattern>com.google.protobuf</pattern>
                  <shadedPattern>${shadeBase}.com.google.protobuf</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.google.thirdparty</pattern>
                  <shadedPattern>${shadeBase}.com.google.thirdparty</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>google.protobuf</pattern>
                  <shadedPattern>${shadeBase}.google.protobuf</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.google.common</pattern>
                  <shadedPattern>${shadeBase}.com.google.common</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.fasterxml.jackson</pattern>
                  <shadedPattern>${shadeBase}.com.fasterxml.jackson</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.http</pattern>
                  <shadedPattern>${shadeBase}.org.apache.http</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.slf4j</pattern>
                  <shadedPattern>${shadeBase}.org.slf4j</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.esri</pattern>
                  <shadedPattern>${shadeBase}.com.esri</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.pentaho</pattern>
                  <shadedPattern>${shadeBase}.org.pentaho</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.commons.codec</pattern>
                  <shadedPattern>${shadeBase}.org.apache.commons.codec</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.commons</pattern>
                  <shadedPattern>${shadeBase}.org.apache.commons</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.codehaus.janino</pattern>
                  <shadedPattern>${shadeBase}.org.codehaus.janino</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.codehaus.commons</pattern>
                  <shadedPattern>${shadeBase}.org.codehaus.commons</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.jayway</pattern>
                  <shadedPattern>${shadeBase}.com.jayway</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.yaml</pattern>
                  <shadedPattern>${shadeBase}.org.yaml</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.yahoo</pattern>
                  <shadedPattern>${shadeBase}.com.yahoo</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>javax.annotation</pattern>
                  <shadedPattern>${shadeBase}.javax.annotation</shadedPattern>
                </relocation>
              </relocations>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>mozilla/public-suffix-list.txt</exclude>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                  </excludes>
                </filter>
              </filters>
              <shadedArtifactAttached>true</shadedArtifactAttached>
              <shadedClassifierName>shaded-all</shadedClassifierName>
            </configuration>
          </execution>

        </executions>
      </plugin>
    </plugins>

    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <excludes>
          <exclude>version/*.properties</exclude>
        </excludes>
      </resource>
      <resource>
        <!-- Copy freemarker template and fmpp configuration files of
             Calcite's SQL parser to allow clients to extend parser. -->
        <directory>${basedir}/src/main/codegen</directory>
        <targetPath>codegen</targetPath>
      </resource>
    </resources>

  <pluginManagement>
    <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-javadoc-plugin</artifactId>
      <executions>
        <execution>
          <id>attach-javadocs</id>
          <goals>
            <goal>jar</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
    </plugins>
  </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>it</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <execution>
                <id>failsafe-integration-test</id>
                <!-- Disable the integration test inherited from the parent pom
                     so that we can run multiple tests, one per database. -->
                <phase>none</phase>
              </execution>
              <execution>
                <id>failsafe-test-mysql</id>
                <goals>
                  <goal>integration-test</goal>
                </goals>
                <phase>integration-test</phase>
                <configuration>
                  <includes>
                    <include>org/apache/calcite/test/JdbcAdapterTest.java</include>
                    <include>org/apache/calcite/test/JdbcTest.java</include>
                  </includes>
                  <systemPropertyVariables>
                    <calcite.test.db>mysql</calcite.test.db>
                  </systemPropertyVariables>
                </configuration>
              </execution>
              <execution>
                <id>failsafe-test-postgresql</id>
                <goals>
                  <goal>integration-test</goal>
                </goals>
                <phase>integration-test</phase>
                <configuration>
                  <includes>
                    <include>org/apache/calcite/test/JdbcAdapterTest.java</include>
                    <include>org/apache/calcite/test/JdbcTest.java</include>
                  </includes>
                  <systemPropertyVariables>
                    <calcite.test.db>postgresql</calcite.test.db>
                  </systemPropertyVariables>
                </configuration>
              </execution>
              <execution>
                <id>failsafe-test-h2</id>
                <goals>
                  <goal>integration-test</goal>
                </goals>
                <phase>integration-test</phase>
                <configuration>
                  <includes>
                    <include>org/apache/calcite/test/JdbcAdapterTest.java</include>
                    <include>org/apache/calcite/test/JdbcTest.java</include>
                  </includes>
                  <systemPropertyVariables>
                    <calcite.test.db>h2</calcite.test.db>
                  </systemPropertyVariables>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>it-oracle</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <execution>
                <id>failsafe-integration-test</id>
                <!-- Disable the integration test inherited from the parent pom
                     so that we can run multiple tests, one per database. -->
                <phase>none</phase>
              </execution>
              <execution>
                <id>failsafe-test-oracle</id>
                <goals>
                  <goal>integration-test</goal>
                </goals>
                <phase>integration-test</phase>
                <configuration>
                  <includes>
                    <include>org/apache/calcite/test/JdbcAdapterTest.java</include>
                    <include>org/apache/calcite/test/JdbcTest.java</include>
                  </includes>
                  <systemPropertyVariables>
                    <calcite.test.db>oracle</calcite.test.db>
                  </systemPropertyVariables>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <dependencies>
        <dependency>
          <!-- Oracle's driver is not open source. If you wish to test against
               Oracle, install the jar in your local maven repository as follows:

               $ cd $ORACLE_HOME/jdbc/lib
               $ mvn install:install-file -DgroupId=com.oracle
                 -DartifactId=ojdbc6 -Dversion=${oracle-jdbc6-driver.version}
                 -Dpackaging=jar -Dfile=ojdbc6.jar -DgeneratePom=true
          -->
          <groupId>com.oracle</groupId>
          <artifactId>ojdbc6</artifactId>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <!-- CALCITE-539: workaround for MSHARED-394: Avoid rewrite of
      destination in DefaultMavenFileFilter#filterFile when producing
      the same contents -->
      <id>generate-version-properties</id>
      <activation>
        <property>
          <name>!skipGenerate</name>
        </property>
      </activation>
      <build>
        <resources>
          <resource>
            <directory>src/main/resources/version</directory>
            <filtering>true</filtering>
          </resource>
        </resources>
      </build>
    </profile>
    <profile>
      <id>skipSlowTests</id>
      <activation>
        <property>
          <name>skipSlowTests</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <excludedGroups>org.apache.calcite.test.SlowTests</excludedGroups>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
