<?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>ydb-jdbc-driver-parent</artifactId>
    <groupId>tech.ydb.jdbc</groupId>
    <version>2.1.5</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>ydb-jdbc-driver-shaded</artifactId>
  <name>YDB JDBC Driver Shaded</name>
  <description>JDBC Driver Shaded over YDB Java SDK</description>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <forceCreation>true</forceCreation>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <includeDependencySources>true</includeDependencySources>
          <dependencySourceIncludes>
            <dependencySourceInclude>tech.ydb.jdbc:ydb-jdbc-driver</dependencySourceInclude>
          </dependencySourceIncludes>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <minimizeJar>true</minimizeJar>
          <createSourcesJar>true</createSourcesJar>
          <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
          <createDependencyReducedPom>true</createDependencyReducedPom>
          <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
          <transformers>
            <transformer />
            <transformer />
            <transformer />
            <transformer>
              <manifestEntries>
                <Automatic-Module-Name>${project.groupId}.jdbc</Automatic-Module-Name>
                <Specification-Title>${spec.title}</Specification-Title>
                <Specification-Version>${spec.version}</Specification-Version>
              </manifestEntries>
            </transformer>
          </transformers>
          <filters>
            <filter>
              <artifact>tech.ydb.jdbc:ydb-jdbc-driver</artifact>
              <includes>
                <include>**</include>
              </includes>
            </filter>
            <filter>
              <artifact>io.jsonwebtoken:jjwt-impl</artifact>
              <includes>
                <include>**</include>
              </includes>
            </filter>
            <filter>
              <artifact>io.jsonwebtoken:jjwt-jackson</artifact>
              <includes>
                <include>**</include>
              </includes>
            </filter>
            <filter>
              <artifact>com.fasterxml.jackson.core:jackson-databind</artifact>
              <includes>
                <include>**</include>
              </includes>
            </filter>
            <filter>
              <artifact>*:*</artifact>
              <excludes>
                <exclude>mozilla/**</exclude>
                <exclude>**/darwin/**</exclude>
                <exclude>**/linux/**</exclude>
                <exclude>**/win32/**</exclude>
                <exclude>**/module-info.class</exclude>
                <exclude>.netbeans_automatic_build</exclude>
                <exclude>google/**/*.proto</exclude>
                <exclude>grpc/**/*.proto</exclude>
                <exclude>META-INF/DEPENDENCIES</exclude>
                <exclude>META-INF/MANIFEST.MF</exclude>
                <exclude>META-INF/maven/**</exclude>
                <exclude>META-INF/native-image/**</exclude>
                <exclude>META-INF/native/**</exclude>
                <exclude>META-INF/services/java.security.Provider</exclude>
                <exclude>META-INF/*.xml</exclude>
                <exclude>META-INF/*.SF</exclude>
                <exclude>META-INF/*.DSA</exclude>
                <exclude>META-INF/*.RSA</exclude>
              </excludes>
            </filter>
          </filters>
          <relocations>
            <relocation>
              <pattern>android.annotation</pattern>
              <shadedPattern>tech.ydb.shaded.android.annotation</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.bouncycastle</pattern>
              <shadedPattern>tech.ydb.shaded.bouncycastle</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.checkerframework</pattern>
              <shadedPattern>tech.ydb.shaded.checkerframework</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.slf4j</pattern>
              <shadedPattern>tech.ydb.shaded.slf4j</shadedPattern>
            </relocation>
            <relocation>
              <pattern>javax.annotation</pattern>
              <shadedPattern>tech.ydb.shaded.javax.annotation</shadedPattern>
            </relocation>
            <relocation>
              <pattern>io.jsonwebtoken</pattern>
              <shadedPattern>tech.ydb.shaded.io.jsonwebtoken</shadedPattern>
            </relocation>
            <relocation>
              <pattern>io.perfmark</pattern>
              <shadedPattern>tech.ydb.shaded.io.perfmark</shadedPattern>
            </relocation>
            <relocation>
              <pattern>com.google</pattern>
              <shadedPattern>tech.ydb.shaded.google</shadedPattern>
            </relocation>
            <relocation>
              <pattern>com.fasterxml.jackson</pattern>
              <shadedPattern>tech.ydb.shaded.jackson</shadedPattern>
            </relocation>
            <relocation>
              <pattern>io.grpc</pattern>
              <shadedPattern>tech.ydb.shaded.grpc</shadedPattern>
            </relocation>
          </relocations>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
