<?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/maven-v4_0_0.xsd">
  <parent>
    <artifactId>datacap</artifactId>
    <groupId>io.edurt.datacap</groupId>
    <version>1.9.0</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>datacap-shaded-ydb</artifactId>
  <description>DataCap - Shaded for YDB</description>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <transformers>
                <transformer />
              </transformers>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <minimizeJar>false</minimizeJar>
          <createSourcesJar>true</createSourcesJar>
          <shadeSourcesContent>true</shadeSourcesContent>
          <shadedArtifactAttached>false</shadedArtifactAttached>
          <artifactSet>
            <excludes>
              <exclude>com.google.code.findbugs:jsr305</exclude>
            </excludes>
          </artifactSet>
          <filters>
            <filter>
              <artifact>*:*</artifact>
              <excludes>
                <exclude>META-INF/*.SF</exclude>
                <exclude>META-INF/*.DSA</exclude>
                <exclude>META-INF/*.RSA</exclude>
                <exclude>META-INF/DEPENDENCIES</exclude>
                <exclude>META-INF/LICENSE.txt</exclude>
                <exclude>META-INF/NOTICE.txt</exclude>
                <exclude>META-INF/maven/**</exclude>
                <exclude>META-INF/native-image/**</exclude>
                <exclude>LICENSE.txt</exclude>
                <exclude>NOTICE.txt</exclude>
                <exclude>mozilla/**</exclude>
                <exclude>arrow-git.properties</exclude>
              </excludes>
            </filter>
          </filters>
          <relocations>
            <relocation>
              <pattern>codegen</pattern>
              <shadedPattern>${datacap.shade.packageName}.codegen</shadedPattern>
            </relocation>
            <relocation>
              <pattern>io.grpc</pattern>
              <shadedPattern>${datacap.shade.packageName}.io.grpc</shadedPattern>
            </relocation>
            <relocation>
              <pattern>com.google</pattern>
              <shadedPattern>${datacap.shade.packageName}.com.google</shadedPattern>
            </relocation>
            <relocation>
              <pattern>io.netty</pattern>
              <shadedPattern>${datacap.shade.packageName}.io.netty</shadedPattern>
            </relocation>
          </relocations>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>compile</id>
            <phase>package</phase>
            <goals>
              <goal>attach-artifact</goal>
            </goals>
            <configuration>
              <artifacts>
                <artifact>
                  <file>${basedir}/target/${project.artifactId}-${project.version}.jar</file>
                  <type>jar</type>
                  <classifier>optional</classifier>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>net.alchim31.maven</groupId>
        <artifactId>scala-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-scaladocs</id>
            <phase>none</phase>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.2</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-test</artifactId>
      <version>1.8.20</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <properties>
    <ydb.version>1.45.6</ydb.version>
    <datacap.shade.packageName>io.edurt.datacap.ydb</datacap.shade.packageName>
  </properties>
</project>
