<?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>com.alibaba.hologres</groupId>
    <artifactId>holo-client</artifactId>
    <version>1.2.0</version>
    <packaging>jar</packaging>
    <url>https://www.hologres.io/</url>
    <name>holo-client</name>
    <description>client for Get/Put</description>
    <licenses>
        <license>
            <name>hologres client license</name>
            <url>https://github.com/hologres</url>
        </license>
    </licenses>

    <scm>
        <url>git@github.com:hologres/hologres-connectors.git</url>
        <connection>scm:git:git@github.com:hologres/hologres-connectors.git</connection>
        <developerConnection>scm:git:git@github.com:hologres/hologres-connectors.git</developerConnection>
    </scm>
    <developers>
        <developer>
            <id>1</id>
            <name>shangtang</name>
            <organization>alibaba-inc</organization>
        </developer>
    </developers>

    <dependencies>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>42.2.18</version>
        </dependency>
        <dependency>
            <groupId>org.checkerframework</groupId>
            <artifactId>checker-qual</artifactId>
            <version>3.5.0</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.10</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>8</source>
                    <target>8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.4</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <relocations>
                                <relocation>
                                    <pattern>org.postgres</pattern>
                                    <shadedPattern>org.shaded.holo.postgres</shadedPattern>
                                    <excludes>
                                        <exclude>org.postgresql.Driver</exclude>
                                    </excludes>
                                </relocation>
                            </relocations>

                            <artifactSet>
                                <excludes>
                                    <exclude>org.checkerframework:checker-qual</exclude>
                                    <exclude>org.slf4j:slf4j-api</exclude>
                                </excludes>
                            </artifactSet>
                            <filters>
                                <filter>
                                    <artifact>org.postgresql:postgresql</artifact>
                                    <excludes>
                                        <exclude>META-INF/**</exclude>
                                        <exclude>org/postgresql/core/v3/ConnectionFactoryImpl.class</exclude>
                                    </excludes>
                                </filter>
                            </filters>

                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>