<?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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>ru.real-time-intelligence</groupId>
  <artifactId>fbase</artifactId>
  <version>0.2.0</version>
  <packaging>jar</packaging>

  <name>FBase</name>
  <description>Hybrid time-series column storage database engine</description>
  <url>https://github.com/real-time-intelligence/fbase</url>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Alexander Kardapolov</name>
      <email>akardapolov@yandex.ru</email>
      <organization>Real time intelligence</organization>
      <organizationUrl>https://real-time-intelligence.ru</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git://github.com/real-time-intelligence/fbase</connection>
    <developerConnection>scm:git:ssh://github.com:real-time-intelligence/fbase</developerConnection>
    <url>http://github.com/real-time-intelligence/fbase/tree/main</url>
    <tag>fbase-0.1.2</tag>
  </scm>

  <issueManagement>
    <system>GitHub</system>
    <url>http://github.com/real-time-intelligence/fbase/issues</url>
  </issueManagement>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <properties>
    <project.build.outputEncoding>UTF-8</project.build.outputEncoding>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <bdb-version>5.0.73</bdb-version>
    <lombok-version>1.18.20</lombok-version>
    <slf4j.version>2.0.6</slf4j.version>
    <log4j2.version>2.19.0</log4j2.version>
    <snappy-java.version>1.1.8.4</snappy-java.version>

    <junit-version>5.7.0</junit-version>
    <querydsl.version>4.4.0</querydsl.version>
    <clickhouse.version>0.3.2</clickhouse.version>
    <h2.version>1.4.200</h2.version>
    <ojdbc10.version>19.15.0.0.1</ojdbc10.version>
    <jackson-databind.version>2.13.4.1</jackson-databind.version>

    <maven.surefire.plugin.version>2.22.2</maven.surefire.plugin.version>
    <maven.compile.plugin.version>3.8.1</maven.compile.plugin.version>
    <maven.release.plugin.version>3.0.0-M7</maven.release.plugin.version>
    <maven.source.plugin.version>3.2.1</maven.source.plugin.version>
    <maven.javadoc.plugin.version>3.4.0</maven.javadoc.plugin.version>
    <maven.gpg.plugin.version>1.5</maven.gpg.plugin.version>
    <nexus.staging.maven.plugin.version>1.6.13</nexus.staging.maven.plugin.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.sleepycat</groupId>
      <artifactId>je</artifactId>
      <version>${bdb-version}</version>
    </dependency>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>${lombok-version}</version>
    </dependency>

    <!--Compression library-->
    <dependency>
      <groupId>org.xerial.snappy</groupId>
      <artifactId>snappy-java</artifactId>
      <version>${snappy-java.version}</version>
      <type>jar</type>
    </dependency>

    <!--Log4j2 logger-->
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
      <version>${log4j2.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <version>${log4j2.version}</version>
    </dependency>

    <!--slf4j facade-->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j.version}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>${slf4j.version}</version>
    </dependency>

    <!--Test-->
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>${junit-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>${junit-version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <version>${h2.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>ru.yandex.clickhouse</groupId>
      <artifactId>clickhouse-jdbc</artifactId>
      <version>${clickhouse.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.oracle.database.jdbc</groupId>
      <artifactId>ojdbc10</artifactId>
      <version>${ojdbc10.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.orientechnologies</groupId>
      <artifactId>orientdb-jdbc</artifactId>
      <version>3.2.16</version>
      <scope>test</scope>
    </dependency>

    <!--Test querydsl-->
    <dependency>
      <groupId>com.querydsl</groupId>
      <artifactId>querydsl-sql</artifactId>
      <version>${querydsl.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.querydsl</groupId>
      <artifactId>querydsl-sql-codegen</artifactId>
      <version>${querydsl.version}</version>
      <scope>test</scope>
    </dependency>

    <!--Test create object integration-->
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>${jackson-databind.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven.surefire.plugin.version}</version>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven.compile.plugin.version}</version>
        <configuration>
          <source>17</source>
          <target>17</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>${maven.release.plugin.version}</version>
        <configuration>
          <goals>deploy nexus-staging:release</goals>
          <checkModificationExcludes>
            <tagNameFormat>@{project.version}</tagNameFormat>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <checkModificationExclude>pom.xml</checkModificationExclude>
            <checkModificationExclude>**</checkModificationExclude>
          </checkModificationExcludes>
        </configuration>
      </plugin>

      <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>
        <configuration>
          <doclint>all,-missing</doclint>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>${nexus.staging.maven.plugin.version}</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>false</autoReleaseAfterClose>
        </configuration>
      </plugin>

    </plugins>
  </build>

  <profiles>
    <!-- GPG Signature on release -->
    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <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-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>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>