<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright Deep BI, Inc.
  ~
  ~ 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>bi.deep</groupId>
    <artifactId>deep-druid-extensions</artifactId>
    <version>33.0.0</version>
    <packaging>pom</packaging>

    <name>Deep Druid Extensions</name>
    <description>Deep Druid Extensions pack</description>
    <url>https://github.com/deep-bi/deep-druid-extensions</url>

    <licenses>
        <license>
            <name>Apache-2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <scm>
      <connection>scm:git:git://github.com/deep-bi/deep-druid-extensions.git</connection>
      <developerConnection>scm:git:git://github.com/deep-bi/deep-druid-extensions.git</developerConnection>
      <url>https://github.com/deep-bi/deep-druid-extensions/tree/main</url>
      <tag>HEAD</tag>
    </scm>

    <developers>
        <developer>
            <id>mikhail-sviatahorau</id>
            <name>Mikhail Sviatahorau</name>
            <email>mikhail.sviatahorau@deep.bi</email>
            <organization>Deep.BI</organization>
            <organizationUrl>https://www.deep.bi/</organizationUrl>
            <roles>
                <role>developer</role>
            </roles>
            <timezone>+2</timezone>
        </developer>
        <developer>
            <id>vivek-dhiman</id>
            <name>Vivek Dhiman</name>
            <email>vivek.dhiman@deep.bi</email>
            <organization>Deep.BI</organization>
            <organizationUrl>https://www.deep.bi/</organizationUrl>
            <roles>
                <role>developer</role>
            </roles>
            <timezone>+5:30</timezone>
        </developer>
    </developers>

    <properties>
        <druid.version>33.0.0</druid.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <jmh.version>1.9.2</jmh.version>
        <project.parent.basedir>.</project.parent.basedir>
    </properties>

    <modules>
        <module>exact-distinct-count-aggregator</module>
        <module>druid-encrypting-password-provider</module>
        <module>druid-filtering-emitter</module>
        <module>druid-same-or-null-aggregator</module>
    </modules>

    <repositories>
        <repository>
            <id>twitter</id>
            <url>https://repo.maven.apache.org/maven2</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.apache.druid</groupId>
            <artifactId>druid-processing</artifactId>
            <version>${druid.version}</version>
            <scope>provided</scope>
        </dependency>

        <!--Tests-->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
                <version>2.30.0</version>
                <configuration>
                    <java>
                        <!-- apply a specific flavor of google-java-format and reflow long strings -->
                        <palantirJavaFormat/>

                        <!-- make sure every file has the following copyright header.
                          optionally, Spotless can set copyright years by digging
                          through git history (see "license" section below) -->
                        <licenseHeader>
                            <file>${project.parent.basedir}/codestyle/LICENSE.txt</file>
                        </licenseHeader>
                    </java>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.2</version>
                <configuration>
                    <argLine>-Duser.timezone=UTC</argLine>
                    <redirectTestOutputToFile>true</redirectTestOutputToFile>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.2.2</version>
                <configuration>
                    <archive>
                        <addMavenDescriptor>false</addMavenDescriptor>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.11.0</version>
                <configuration>
                    <compilerArgument>-Xlint:unchecked</compilerArgument>
                    <source>11</source>
                    <target>11</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</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>3.11.2</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>3.1.0</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <gpgArguments>
                        <arg>--pinentry-mode</arg>
                        <arg>loopback</arg>
                    </gpgArguments>
                </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>
              </configuration>
            </plugin>
        </plugins>
    </build>
</project>
