<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright 2021 Google LLC

 Licensed 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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         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.google.cloud.sql</groupId>
    <artifactId>jdbc-socket-factory-parent</artifactId>
    <version>1.16.0</version><!-- {x-version-update:jdbc-socket-factory-parent:current} -->
    <relativePath>../../pom.xml</relativePath>
  </parent>
  <artifactId>cloud-sql-connector-jdbc-sqlserver</artifactId>
    <version>1.16.0</version><!-- {x-version-update:cloud-sql-connector-jdbc-sqlserver:current} -->
  <packaging>jar</packaging>

  <name>Cloud SQL JDBC Connector for SQL Server</name>
  <description>
    Socket factory for the Microsoft JDBC Driver for SQL Server that allows a user with the
    appropriate permissions to connect to a Cloud SQL database without having to deal with IP
    allowlisting or SSL certificates manually.
  </description>

  <properties>
    <assembly.skipAssembly>false</assembly.skipAssembly>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.google.cloud.sql</groupId>
      <artifactId>jdbc-socket-factory-core</artifactId>
      <version>${project.parent.version}</version>
    </dependency>
    <dependency>
      <groupId>com.microsoft.sqlserver</groupId>
      <artifactId>mssql-jdbc</artifactId>
      <version>12.6.0.jre8</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>io.micrometer</groupId>
          <artifactId>micrometer-core</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.azure</groupId>
          <artifactId>azure-identity</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.truth</groupId>
      <artifactId>truth</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.zaxxer</groupId>
      <artifactId>HikariCP</artifactId>
      <scope>test</scope>
    </dependency>
    <!-- Logging -->
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>jar-with-driver-and-dependencies</id>
      <dependencies>
        <dependency>
          <groupId>com.microsoft.sqlserver</groupId>
          <artifactId>mssql-jdbc</artifactId>
          <version>12.6.0.jre8</version>
        </dependency>
      </dependencies>
    </profile>
  </profiles>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <configuration>
          <usedDependencies>
            <!-- This dependency is not used at compile-time. -->
            <dependency>ch.qos.logback:logback-classic</dependency>
          </usedDependencies>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
