<?xml version="1.0" encoding="UTF-8"?>

<!--
  Copyright 2023 Google LLC All Rights Reserved

 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="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>

    <groupId>com.google.zetasql.toolkit</groupId>
    <artifactId>zetasql-toolkit</artifactId>
    <version>0.4.1</version>
    <packaging>pom</packaging>

    <name>${project.groupId}:${project.artifactId}</name>
    <url>https://github.com/GoogleCloudPlatform/zetasql-toolkit</url>
    <description>
        The ZetaSQL Toolkit is a library that helps users use ZetaSQL Java API
        to perform SQL analysis for multiple query engines, including
        BigQuery and Cloud Spanner.
    </description>

    <scm>
        <connection>scm:git:git@github.com:GoogleCloudPlatform/zetasql-toolkit.git</connection>
        <developerConnection>scm:git:git@github.com:GoogleCloudPlatform/zetasql-toolkit.git</developerConnection>
        <url>git@github.com:GoogleCloudPlatform/zetasql-toolkit.git</url>
        <tag>HEAD</tag>
  </scm>

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

    <developers>
        <developer>
            <id>ppaglilla</id>
            <name>Pablo Paglilla</name>
            <email>ppaglilla@google.com</email>
            <organization>Google</organization>
            <organizationUrl>http://www.google.com</organizationUrl>
        </developer>
    </developers>

    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.deploy.skip>false</maven.deploy.skip>
        <maven.test.skip>true</maven.test.skip>
        <!-- Dependency versions -->
        <zetasql.version>2023.04.1</zetasql.version>
        <google.cloud.libraries.version>26.15.0</google.cloud.libraries.version>
        <slf4j.version>1.7.25</slf4j.version>
        <!-- Testing dependency versions -->
        <junit.version>5.9.3</junit.version>
        <mockito.version>4.11.0</mockito.version>
        <!-- Plugin versions -->
        <maven.source.plugin.version>3.3.0</maven.source.plugin.version>
        <maven.javadoc.plugin.version>3.5.0</maven.javadoc.plugin.version>
        <maven.gpg.plugin.version>3.1.0</maven.gpg.plugin.version>
        <maven.surefire.version>3.1.0</maven.surefire.version>
    </properties>

    <modules>
        <module>zetasql-toolkit-core</module>
        <module>zetasql-toolkit-bigquery</module>
        <module>zetasql-toolkit-spanner</module>
        <module>zetasql-toolkit-examples</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.google.cloud</groupId>
                <artifactId>libraries-bom</artifactId>
                <version>${google.cloud.libraries.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${junit.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.google.zetasql</groupId>
                <artifactId>zetasql-client</artifactId>
                <version>${zetasql.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.zetasql</groupId>
                <artifactId>zetasql-types</artifactId>
                <version>${zetasql.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.zetasql</groupId>
                <artifactId>zetasql-jni-channel</artifactId>
                <version>${zetasql.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-junit-jupiter</artifactId>
                <version>${mockito.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>


    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven.source.plugin.version}</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven.javadoc.plugin.version}</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven.gpg.plugin.version}</version>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven.surefire.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <distributionManagement>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Sonatype Nexus Staging</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>http://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
        </profile>
        <profile>
            <id>release</id>
        </profile>
    </profiles>

</project>
