<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.databricks</groupId>
  <artifactId>databricks-jdbc</artifactId>
  <name>Databricks JDBC Driver</name>
  <version>1.0.9-oss</version>
  <description>Databricks JDBC Driver.</description>
  <url>https://github.com/databricks/databricks-jdbc</url>
  <issueManagement>
    <system>GitHub Issues</system>
    <url>https://github.com/databricks/databricks-jdbc/issues</url>
  </issueManagement>
  <developers>
    <developer>
      <name>Databricks JDBC Team</name>
      <email>eng-oss-sql-driver@databricks.com</email>
      <organization>Databricks</organization>
      <organizationUrl>https://www.databricks.com</organizationUrl>
    </developer>
  </developers>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://github.com/databricks/databricks-jdbc/blob/main/LICENSE</url>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:https://github.com/databricks/databricks-jdbc.git</connection>
    <developerConnection>scm:git:https://github.com/databricks/databricks-jdbc.git</developerConnection>
    <url>https://github.com/databricks/databricks-jdbc</url>
  </scm>
  <build>
    <finalName>${project.artifactId}-${project.version}</finalName>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.3.0</version>
        <executions>
          <execution>
            <id>attach-thin-jar</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <classifier>thin</classifier>
            </configuration>
          </execution>
          <execution>
            <id>attach-test-jar</id>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <archive>
            <manifest>
              <mainClass>com.databricks.client.jdbc.Driver</mainClass>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven-surefire-plugin.version}</version>
        <configuration>
          <excludes>
            <exclude>**/DatabricksDriverExamples.java</exclude>
            <exclude>**/integration/**/*.java</exclude>
            <exclude>**/ErrorTypes.java</exclude>
            <exclude>**/ErrorCodes.java</exclude>
            <exclude>**/ProxyTest.java</exclude>
            <exclude>**/LoggingTest.java</exclude>
            <exclude>**/SSLTest.java</exclude>
          </excludes>
          <argLine>@{argLine}
            --add-opens=java.base/java.nio=ALL-UNNAMED
            -Dnet.bytebuddy.experimental=true</argLine>
          <systemPropertyVariables>
            <com.databricks.jdbc.loggerImpl>JDKLOGGER</com.databricks.jdbc.loggerImpl>
            <java.util.logging.config.file>${project.basedir}/src/test/resources/logging.properties</java.util.logging.config.file>
          </systemPropertyVariables>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.2.1</version>
        <configuration>
          <executable>java</executable>
          <arguments>
            <argument>--add-opens=java.base/java.nio=ALL-UNNAMED</argument>
            <argument>-classpath</argument>
            <classpath />
            <argument>com.databricks.jdbc.sqllogictest.SLTMain</argument>
            <argument>-e</argument>
            <argument>${slt.executor}</argument>
            <argument>-p</argument>
            <argument>${slt.token}</argument>
          </arguments>
          <classpathScope>test</classpathScope>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <annotationProcessorPaths>
            <path>
              <groupId>org.immutables</groupId>
              <artifactId>value</artifactId>
              <version>${immutables.value.version}</version>
            </path>
          </annotationProcessorPaths>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.owasp</groupId>
        <artifactId>dependency-check-maven</artifactId>
        <version>12.1.1</version>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <formats>
            <format>HTML</format>
            <format>JSON</format>
          </formats>
          <failBuildOnCVSS>7</failBuildOnCVSS>
          <nvdApiKey>${nvd.api.key}</nvdApiKey>
          <nvdMaxRetryCount>10</nvdMaxRetryCount>
          <nvdApiDelay>4000</nvdApiDelay>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <version>2.39.0</version>
        <executions>
          <execution>
            <id>format</id>
            <phase>compile</phase>
            <goals>
              <goal>apply</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <java>
            <googleJavaFormat>
              <version>1.18.1</version>
            </googleJavaFormat>
          </java>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.11</version>
        <executions>
          <execution>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>report</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <excludes>
            <exclude>**/*Constants*</exclude>
            <exclude>**/*Exception*</exclude>
            <exclude>**/CommandName*</exclude>
            <exclude>**/DatabricksJdbcConstants*</exclude>
            <exclude>**/DatabricksJdbcUrlParams*</exclude>
            <exclude>**/Driver*</exclude>
            <exclude>**/EnvironmentVariables*</exclude>
            <exclude>**/model/**</exclude>
            <exclude>**/thrift/generated/**</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.5.0</version>
        <executions>
          <execution>
            <id>shade and package jars</id>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <shadedArtifactAttached>false</shadedArtifactAttached>
              <relocations>
                <relocation>
                  <pattern>codegen</pattern>
                  <shadedPattern>com.databricks.internal.codegen</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.databricks.sdk</pattern>
                  <shadedPattern>com.databricks.internal.sdk</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.fasterxml</pattern>
                  <shadedPattern>com.databricks.internal.fasterxml</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.google</pattern>
                  <shadedPattern>com.databricks.internal.google</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.nimbusds</pattern>
                  <shadedPattern>com.databricks.internal.nimbusds</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>io</pattern>
                  <shadedPattern>com.databricks.internal.io</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>net.jpountz</pattern>
                  <shadedPattern>com.databricks.internal.jpountz</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache</pattern>
                  <shadedPattern>com.databricks.internal.apache</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.bouncycastle</pattern>
                  <shadedPattern>com.databricks.internal.bouncycastle</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.checkerframework</pattern>
                  <shadedPattern>com.databricks.internal.checkerframework</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.ini4j</pattern>
                  <shadedPattern>com.databricks.internal.ini4j</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.json</pattern>
                  <shadedPattern>com.databricks.internal.json</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.osgi</pattern>
                  <shadedPattern>com.databricks.internal.osgi</shadedPattern>
                </relocation>
              </relocations>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/DEPENDENCIES</exclude>
                    <exclude>META-INF/LICENSE.txt</exclude>
                    <exclude>META-INF/versions/**</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>edu/**</exclude>
                    <exclude>javax/**</exclude>
                    <exclude>jakarta/**</exclude>
                    <exclude>net/jcip/**</exclude>
                    <exclude>oauth/**</exclude>
                  </excludes>
                </filter>
              </filters>
              <transformers>
                <transformer />
                <transformer>
                  <mainClass>com.databricks.client.jdbc.Driver</mainClass>
                  <manifestEntries>
                    <Implementation-Title>${project.artifactId}</Implementation-Title>
                    <Implementation-Version>${project.version}</Implementation-Version>
                  </manifestEntries>
                </transformer>
                <transformer />
              </transformers>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-transform-maven-shade-plugin-extensions</artifactId>
            <version>0.1.0</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>local-deploy</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-deploy-plugin</artifactId>
            <version>2.8.2</version>
            <executions>
              <execution>
                <id>skip-default-deploy</id>
                <phase>deploy</phase>
                <goals>
                  <goal>deploy</goal>
                </goals>
                <configuration>
                  <skip>true</skip>
                </configuration>
              </execution>
              <execution>
                <id>deploy-with-custom-pom</id>
                <phase>deploy</phase>
                <goals>
                  <goal>deploy-file</goal>
                </goals>
                <configuration>
                  <file>${project.build.directory}/${project.build.finalName}.jar</file>
                  <pomFile>${project.basedir}/uber-minimal-pom.xml</pomFile>
                  <files>${project.build.directory}/${project.build.finalName}-thin.jar</files>
                  <types>jar</types>
                  <classifiers>thin</classifiers>
                  <repositoryId>local-test-repo</repositoryId>
                  <url>file://${project.build.directory}/local-repo</url>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.3.1</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.8.0</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <doclint>none</doclint>
              <sourcepath>${project.build.sourceDirectory}:${project.build.directory}/generated-sources/annotations</sourcepath>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <gpgArguments>
                <arg>--batch</arg>
                <arg>--pinentry-mode</arg>
                <arg>loopback</arg>
                <arg>--no-tty</arg>
                <arg>--yes</arg>
              </gpgArguments>
              <passphrase>${env.GPG_PASSPHRASE}</passphrase>
              <pomFile>${project.basedir}/uber-minimal-pom.xml</pomFile>
              <sources>${project.build.directory}/${project.build.finalName}-sources.jar</sources>
              <javadoc>${project.build.directory}/${project.build.finalName}-javadoc.jar</javadoc>
              <files>${project.build.directory}/${project.build.finalName}-thin.jar</files>
              <types>jar</types>
              <classifiers>thin</classifiers>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.sonatype.central</groupId>
            <artifactId>central-publishing-maven-plugin</artifactId>
            <version>0.8.0</version>
            <extensions>true</extensions>
            <configuration>
              <publishingServerId>central</publishingServerId>
              <autoPublish>true</autoPublish>
              <waitUntil>published</waitUntil>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-slf4j2-impl</artifactId>
      <version>2.22.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <version>2.22.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
      <version>2.22.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>5.9.2</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>junit-jupiter-api</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-jupiter-params</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-jupiter-engine</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-inline</artifactId>
      <version>5.2.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>mockito-core</artifactId>
          <groupId>org.mockito</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-junit-jupiter</artifactId>
      <version>5.2.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>mockito-core</artifactId>
          <groupId>org.mockito</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-jupiter-api</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.immutables</groupId>
      <artifactId>value</artifactId>
      <version>2.9.2</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>net.hydromatic</groupId>
      <artifactId>sql-logic-test</artifactId>
      <version>0.3</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>reflections</artifactId>
          <groupId>org.reflections</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.wiremock</groupId>
      <artifactId>wiremock</artifactId>
      <version>3.5.4</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>commons-fileupload</artifactId>
          <groupId>commons-fileupload</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jetty-server</artifactId>
          <groupId>org.eclipse.jetty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jetty-servlet</artifactId>
          <groupId>org.eclipse.jetty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jetty-servlets</artifactId>
          <groupId>org.eclipse.jetty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jetty-webapp</artifactId>
          <groupId>org.eclipse.jetty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jetty-proxy</artifactId>
          <groupId>org.eclipse.jetty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>http2-server</artifactId>
          <groupId>org.eclipse.jetty.http2</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jetty-alpn-server</artifactId>
          <groupId>org.eclipse.jetty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jetty-alpn-java-server</artifactId>
          <groupId>org.eclipse.jetty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jetty-alpn-java-client</artifactId>
          <groupId>org.eclipse.jetty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jetty-alpn-client</artifactId>
          <groupId>org.eclipse.jetty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>xmlunit-core</artifactId>
          <groupId>org.xmlunit</groupId>
        </exclusion>
        <exclusion>
          <artifactId>xmlunit-legacy</artifactId>
          <groupId>org.xmlunit</groupId>
        </exclusion>
        <exclusion>
          <artifactId>xmlunit-placeholders</artifactId>
          <groupId>org.xmlunit</groupId>
        </exclusion>
        <exclusion>
          <artifactId>json-unit-core</artifactId>
          <groupId>net.javacrumbs.json-unit</groupId>
        </exclusion>
        <exclusion>
          <artifactId>json-path</artifactId>
          <groupId>com.jayway.jsonpath</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jopt-simple</artifactId>
          <groupId>net.sf.jopt-simple</groupId>
        </exclusion>
        <exclusion>
          <artifactId>handlebars</artifactId>
          <groupId>com.github.jknack</groupId>
        </exclusion>
        <exclusion>
          <artifactId>handlebars-helpers</artifactId>
          <groupId>com.github.jknack</groupId>
        </exclusion>
        <exclusion>
          <artifactId>json-schema-validator</artifactId>
          <groupId>com.networknt</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>${commons-lang3.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <distributionManagement>
    <repository>
      <id>local-test-repo</id>
      <url>file://${project.build.directory}/local-repo</url>
    </repository>
  </distributionManagement>
  <properties>
    <wiremock.version>3.5.4</wiremock.version>
    <slt.executor>dbsql</slt.executor>
    <jackson.version>2.18.3</jackson.version>
    <slf4j.version>2.0.13</slf4j.version>
    <commons-lang3.version>3.18.0</commons-lang3.version>
    <log4j.version>2.22.1</log4j.version>
    <commons-configuration.version>2.10.1</commons-configuration.version>
    <nimbusjose.version>10.0.2</nimbusjose.version>
    <slt.token>dummy-token</slt.token>
    <lz4-compression.version>1.8.0</lz4-compression.version>
    <bouncycastle.version>1.78.1</bouncycastle.version>
    <maven.compiler.source>11</maven.compiler.source>
    <annotation.version>1.3.5</annotation.version>
    <databricks-sdk.version>0.52.0</databricks-sdk.version>
    <maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
    <google.findbugs.annotations.version>3.0.1</google.findbugs.annotations.version>
    <netty.version>4.2.0.Final</netty.version>
    <sql-logic-test.version>0.3</sql-logic-test.version>
    <httpclient.version>4.5.14</httpclient.version>
    <arrow.version>17.0.0</arrow.version>
    <google.guava.version>33.0.0-jre</google.guava.version>
    <grpc.version>1.71.0</grpc.version>
    <resilience4j.version>1.7.0</resilience4j.version>
    <commons-io.version>2.14.0</commons-io.version>
    <async-httpclient.version>5.3.1</async-httpclient.version>
    <mockito.version>5.2.0</mockito.version>
    <junit.jupiter.version>5.9.2</junit.jupiter.version>
    <thrift.version>0.19.0</thrift.version>
    <maven.compiler.target>11</maven.compiler.target>
    <immutables.value.version>2.9.2</immutables.value.version>
  </properties>
</project>
