<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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.e6data</groupId>
    <artifactId>e6-jdbc-driver</artifactId>
    <version>2.0.25</version>

    <name>e6-jdbc</name>
    <description>E6data jdbc driver provides connectivity for client to connect with e6 engine. It is e6 engine own jdbc
        driver to support querying with e6 engine.
    </description>
    <url>https://github.com/e6x-labs/e6-jdbc-driver</url>

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

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>e6-labs-common-lib</id>
            <name>e6-labs-common-lib</name>
            <url>https://e6-labs-298655976287.d.codeartifact.us-east-2.amazonaws.com/maven/common-lib/</url>
        </repository>
    </distributionManagement>

    <developers>
        <developer>
            <name>Adishesh Kishore</name>
            <email>adishesh@e6x.io</email>
            <organization>e6data</organization>
            <organizationUrl>http://www.e6data.com</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/e6x-labs/e6-jdbc-driver.git</connection>
        <developerConnection>scm:git:git://github.com/e6x-labs/e6-jdbc-driver.git</developerConnection>
        <url>https://github.com/e6x-labs/e6-jdbc-driver</url>
    </scm>

    <properties>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <revision>1.0</revision>
        <jmh.version>1.8</jmh.version>
        <maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version>
        <gpg_key>SNAPSHOT</gpg_key>
        <gpg_passphrase>SNAPSHOT</gpg_passphrase>
        <grpc-version>1.56.0</grpc-version>
        <protobuf-version>3.22.3</protobuf-version>
        <log4j2.version>2.20.0</log4j2.version>
    </properties>


    <dependencies>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.14</version>
        </dependency>
        <dependency>
            <groupId>org.apache.parquet</groupId>
            <artifactId>parquet-column</artifactId>
            <version>1.14.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.thrift</groupId>
            <artifactId>libthrift</artifactId>
            <version>0.20.0</version>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-core</artifactId>
            <version>1.64.0</version>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-netty</artifactId>
            <version>1.64.0</version>
            <exclusions>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-codec-http2</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- we are enforcing this netty-codec-http2 version because we have  CVE-2025-55163 Vulnerability in grpc-netty above
        This explicit dependency should be removed along with exclusion above in grpc-netty once grpc-netty is updated with
        correct dependencies. We can check that here on latest version: https://mvnrepository.com/artifact/io.grpc/grpc-netty -->
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-codec-http2</artifactId>
            <version>4.1.124.Final</version>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-services</artifactId>
            <version>1.64.0</version>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-testing</artifactId>
            <version>1.64.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-inprocess</artifactId>
            <version>1.64.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-protobuf</artifactId>
            <version>1.64.0</version>
            <exclusions>
                <exclusion>
                    <groupId>com.google.protobuf</groupId>
                    <artifactId>protobuf-java</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java</artifactId>
            <version>3.25.5</version>
        </dependency>

        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-stub</artifactId>
            <version>1.64.0</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>2.0.13</version>
        </dependency>
<!--        <dependency>-->
<!--            <groupId>org.slf4j</groupId>-->
<!--            <artifactId>slf4j-simple</artifactId>-->
<!--            <version>2.0.9</version>-->
<!--            <scope>runtime</scope>-->
<!--        </dependency>-->
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20231013</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.didiglobal.thriftmock</groupId>
            <artifactId>thrift-mock-server4junit</artifactId>
            <version>1.0.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>4.11.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>5.11.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
            <version>3.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>2.0.2-beta</version>
            <scope>test</scope>
        </dependency>


        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>2.20.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>2.20.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j-impl</artifactId>
            <version>2.20.0</version>
        </dependency>

        <!--        <dependency>-->
        <!--            <groupId>org.apache.maven.plugins</groupId>-->
        <!--            <artifactId>maven-deploy-plugin</artifactId>-->
        <!--            <version>3.1.2</version>-->
        <!--        </dependency>-->

        <!--        <dependency>-->
        <!--            <groupId>org.sonatype.central</groupId>-->
        <!--            <artifactId>central-publishing-maven-plugin</artifactId>-->
        <!--            <version>0.5.0</version>-->
        <!--        </dependency>-->

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.12.0</version>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.15.0</version>
        </dependency>


    </dependencies>

    <profiles>
        <profile>
            <id>maven central deploy</id>
            <build>
                <!--        <extensions>-->
                <!--            <extension>-->
                <!--                <groupId>kr.motd.maven</groupId>-->
                <!--                <artifactId>os-maven-plugin</artifactId>-->
                <!--                <version>1.7.1</version>-->
                <!--            </extension>-->
                <!--        </extensions>-->
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>flatten-maven-plugin</artifactId>
                        <version>1.0.0</version>
                        <configuration>
                            <updatePomFile>false</updatePomFile>
                        </configuration>
                        <executions>
                            <execution>
                                <id>flatten</id>
                                <phase>process-resources</phase>
                                <goals>
                                    <goal>flatten</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>flatten.clean</id>
                                <phase>clean</phase>
                                <goals>
                                    <goal>clean</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!--            publishing via central-->

                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.5.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <tokenAuth>true</tokenAuth>
                            <checksums>required</checksums>
                        </configuration>
                    </plugin>

                    <!--            publishing via ossrh-->

                    <!--            <plugin>-->
                    <!--                <groupId>org.sonatype.plugins</groupId>-->
                    <!--                <artifactId>nexus-staging-maven-plugin</artifactId>-->
                    <!--                <version>1.6.13</version>-->
                    <!--                <extensions>true</extensions>-->
                    <!--                <configuration>-->
                    <!--                    <serverId>ossrh</serverId>-->
                    <!--                    <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>-->
                    <!--                    <autoReleaseAfterClose>true</autoReleaseAfterClose>-->
                    <!--                </configuration>-->
                    <!--            </plugin>-->

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.4</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <keyname>${gpg_key}</keyname>
                                    <passphrase>${gpg_passphrase}</passphrase>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>


                    <!--            <plugin>-->
                    <!--                <groupId>org.xolstice.maven.plugins</groupId>-->
                    <!--                <artifactId>protobuf-maven-plugin</artifactId>-->
                    <!--                <version>0.6.1</version>-->
                    <!--                <configuration>-->
                    <!--                    <protocArtifact>com.google.protobuf:protoc:${protobuf-version}:exe:${os.detected.classifier}-->
                    <!--                    </protocArtifact>-->
                    <!--                    <pluginId>grpc-java</pluginId>-->
                    <!--                    <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc-version}:exe:${os.detected.classifier}-->
                    <!--                    </pluginArtifact>-->
                    <!--                    <outputDirectory>${project.basedir}/src/main/java</outputDirectory>-->
                    <!--                    <clearOutputDirectory>false</clearOutputDirectory>-->
                    <!--                    <protoSourceRoot>${project.basedir}/src/main/resources</protoSourceRoot>-->

                    <!--                </configuration>-->
                    <!--                <executions>-->
                    <!--                    <execution>-->
                    <!--                        <goals>-->
                    <!--                            <goal>compile</goal>-->
                    <!--                            <goal>compile-custom</goal>-->
                    <!--                        </goals>-->
                    <!--                    </execution>-->
                    <!--                </executions>-->
                    <!--            </plugin>-->
                </plugins>
            </build>
        </profile>

        <profile>
            <id>nexus deploy</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>flatten-maven-plugin</artifactId>
                        <version>1.0.0</version>
                        <configuration>
                            <updatePomFile>true</updatePomFile>
                        </configuration>
                        <executions>
                            <execution>
                                <id>flatten</id>
                                <phase>process-resources</phase>
                                <goals>
                                    <goal>flatten</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>flatten.clean</id>
                                <phase>clean</phase>
                                <goals>
                                    <goal>clean</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!--            <plugin>-->
                    <!--                <groupId>org.xolstice.maven.plugins</groupId>-->
                    <!--                <artifactId>protobuf-maven-plugin</artifactId>-->
                    <!--                <version>0.6.1</version>-->
                    <!--                <configuration>-->
                    <!--                    <protocArtifact>com.google.protobuf:protoc:${protobuf-version}:exe:${os.detected.classifier}-->
                    <!--                    </protocArtifact>-->
                    <!--                    <pluginId>grpc-java</pluginId>-->
                    <!--                    <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc-version}:exe:${os.detected.classifier}-->
                    <!--                    </pluginArtifact>-->
                    <!--                    <outputDirectory>${project.basedir}/src/main/java</outputDirectory>-->
                    <!--                    <clearOutputDirectory>false</clearOutputDirectory>-->
                    <!--                    <protoSourceRoot>${project.basedir}/src/main/resources</protoSourceRoot>-->

                    <!--                </configuration>-->
                    <!--                <executions>-->
                    <!--                    <execution>-->
                    <!--                        <goals>-->
                    <!--                            <goal>compile</goal>-->
                    <!--                            <goal>compile-custom</goal>-->
                    <!--                        </goals>-->
                    <!--                    </execution>-->
                    <!--                </executions>-->
                    <!--            </plugin>-->
                </plugins>
            </build>
        </profile>
    </profiles>
    <build>
<!--        <extensions>-->
<!--            <extension>-->
<!--                <groupId>kr.motd.maven</groupId>-->
<!--                <artifactId>os-maven-plugin</artifactId>-->
<!--                <version>1.7.1</version>-->
<!--            </extension>-->
<!--        </extensions>-->

        <plugins>
<!--            <plugin>-->
<!--                <groupId>org.xolstice.maven.plugins</groupId>-->
<!--                <artifactId>protobuf-maven-plugin</artifactId>-->
<!--                <version>0.6.1</version>-->
<!--                <configuration>-->
<!--                    <protocArtifact>com.google.protobuf:protoc:${protobuf-version}:exe:${os.detected.classifier}-->
<!--                    </protocArtifact>-->
<!--                    <pluginId>grpc-java</pluginId>-->
<!--                    <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc-version}:exe:${os.detected.classifier}-->
<!--                    </pluginArtifact>-->
<!--                    <outputDirectory>${project.basedir}/src/main/java</outputDirectory>-->
<!--                    <clearOutputDirectory>false</clearOutputDirectory>-->
<!--                    <protoSourceRoot>${project.basedir}/src/main/resources</protoSourceRoot>-->

<!--                </configuration>-->
<!--                <executions>-->
<!--                    <execution>-->
<!--                        <goals>-->
<!--                            <goal>compile</goal>-->
<!--                            <goal>compile-custom</goal>-->
<!--                        </goals>-->
<!--                    </execution>-->
<!--                </executions>-->
<!--            </plugin>-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.6.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <shadedArtifactAttached>true</shadedArtifactAttached>
                    <shadedClassifierName>with-dependencies</shadedClassifierName>
                    <createDependencyReducedPom>false</createDependencyReducedPom>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
