<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>
  <packaging>pom</packaging>

  <groupId>com.yandex.ydb</groupId>
  <artifactId>ydb-sdk-parent</artifactId>
  <version>1.9.2</version>

  <name>Java SDK for Yandex Datatabase (YDB)</name>
  <description>Java SDK for Yandex Datatabase (YDB)</description>
  <url>https://github.com/yandex-cloud/ydb-java-sdk</url>

  <modules>
    <module>auth-iam</module>
    <module>core</module>
    <module>examples</module>
    <module>proto-gen</module>
    <module>table</module>
    <module>jdbc</module>
    <module>jdbc/uberjar</module>
  </modules>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

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

  <scm>
    <connection>scm:git:https://github.com/yandex-cloud/ydb-java-sdk.git</connection>
    <developerConnection>scm:git:https://github.com/yandex-cloud/ydb-java-sdk.git</developerConnection>
    <url>https://github.com/yandex-cloud/ydb-java-sdk.git</url>
  </scm>

  <developers>
    <developer>
      <name>Sergey Polovko</name>
      <email>jamel@yandex-team.ru</email>
      <organization>Yandex LLC</organization>
      <organizationUrl>https://yandex.com/company/</organizationUrl>
    </developer>
  </developers>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.6.0</version>
        <configuration>
          <target>1.8</target>
          <source>1.8</source>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.0.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.1.0</version>
        <configuration>
          <source>8</source>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <!-- Code Coverage report generation -->
      <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.8.7</version>
          <executions>
              <execution>
                  <goals>
                      <goal>prepare-agent</goal>
                  </goals>
              </execution>
              <execution>
                  <id>generate-code-coverage-report</id>
                  <phase>test</phase>
                  <goals>
                      <goal>report</goal>
                  </goals>
              </execution>
          </executions>
      </plugin>
  </plugins>
  </build>

  <profiles>
    <profile>
      <id>internal</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <distributionManagement>
        <repository>
          <id>internal</id>
          <url>http://artifactory.yandex.net/artifactory/yandex_infra</url>
        </repository>
      </distributionManagement>
    </profile>
    <profile>
      <id>ossrh</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <distributionManagement>
        <repository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
      </distributionManagement>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <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>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.8</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
