<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~    Copyright (c) 2024 AsyncHttpClient Project. All rights reserved.
  ~
  ~    Licensed under the Apache License, Version 2.0 (the "License");
  ~    you may not use this file except in compliance with the License.
  ~    You may obtain a copy of the License at
  ~
  ~        http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~    Unless required by applicable law or agreed to in writing, software
  ~    distributed under the License is distributed on an "AS IS" BASIS,
  ~    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~    See the License for the specific language governing permissions and
  ~    limitations under the License.
  -->
<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>org.asynchttpclient</groupId>
    <artifactId>async-http-client-project</artifactId>
    <version>3.0.2</version>
    <packaging>pom</packaging>

    <name>AHC/Project</name>
    <description>
        The Async Http Client (AHC) library's purpose is to allow Java
        applications to easily execute HTTP requests and
        asynchronously process the response.
    </description>

    <url>https://github.com/AsyncHttpClient/async-http-client</url>

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

    <properties>
        <java.version>11</java.version>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <netty.version>4.1.119.Final</netty.version>
        <netty.iouring>0.0.26.Final</netty.iouring>
        <brotli4j.version>1.18.0</brotli4j.version>
        <slf4j.version>2.0.16</slf4j.version>
        <zstd-jni.version>1.5.7-2</zstd-jni.version>
        <activation.version>2.0.1</activation.version>
        <logback.version>1.5.18</logback.version>
        <jetbrains-annotations.version>26.0.2</jetbrains-annotations.version>
    </properties>

    <developers>
        <developer>
            <id>hyperxpro</id>
            <name>Aayush Atharva</name>
            <email>aayush@shieldblaze.com</email>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:AsyncHttpClient/async-http-client.git</connection>
        <developerConnection>scm:git:git@github.com:AsyncHttpClient/async-http-client.git</developerConnection>
        <url>https://github.com/AsyncHttpClient/async-http-client/tree/master</url>
        <tag>HEAD</tag>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-staging</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <issueManagement>
        <system>github</system>
        <url>https://github.com/AsyncHttpClient/async-http-client/issues</url>
    </issueManagement>

    <mailingLists>
        <mailingList>
            <name>asynchttpclient</name>
            <archive>https://groups.google.com/group/asynchttpclient/topics</archive>
            <subscribe>https://groups.google.com/group/asynchttpclient/subscribe</subscribe>
            <unsubscribe>https://groups.google.com/group/asynchttpclient/subscribe</unsubscribe>
            <post>asynchttpclient@googlegroups.com</post>
        </mailingList>
    </mailingLists>

    <modules>
        <module>client</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>5.11.4</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>io.github.nettyplus</groupId>
                <artifactId>netty-leak-detector-junit-extension</artifactId>
                <version>0.0.6</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-buffer</artifactId>
            <version>${netty.version}</version>
        </dependency>

        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-codec-http</artifactId>
            <version>${netty.version}</version>
        </dependency>

        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-codec</artifactId>
            <version>${netty.version}</version>
        </dependency>

        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-codec-socks</artifactId>
            <version>${netty.version}</version>
        </dependency>

        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-handler-proxy</artifactId>
            <version>${netty.version}</version>
        </dependency>

        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-common</artifactId>
            <version>${netty.version}</version>
        </dependency>

        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-transport</artifactId>
            <version>${netty.version}</version>
        </dependency>

        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-handler</artifactId>
            <version>${netty.version}</version>
        </dependency>

        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-resolver-dns</artifactId>
            <version>${netty.version}</version>
        </dependency>

        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-transport-native-epoll</artifactId>
            <classifier>linux-x86_64</classifier>
            <version>${netty.version}</version>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-transport-native-epoll</artifactId>
            <classifier>linux-aarch_64</classifier>
            <version>${netty.version}</version>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-transport-native-kqueue</artifactId>
            <classifier>osx-x86_64</classifier>
            <version>${netty.version}</version>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-transport-native-kqueue</artifactId>
            <classifier>osx-aarch_64</classifier>
            <version>${netty.version}</version>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>io.netty.incubator</groupId>
            <artifactId>netty-incubator-transport-native-io_uring</artifactId>
            <version>${netty.iouring}</version>
            <classifier>linux-x86_64</classifier>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>io.netty.incubator</groupId>
            <artifactId>netty-incubator-transport-native-io_uring</artifactId>
            <version>${netty.iouring}</version>
            <classifier>linux-aarch_64</classifier>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>com.github.luben</groupId>
            <artifactId>zstd-jni</artifactId>
            <version>${zstd-jni.version}</version>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>com.aayushatharva.brotli4j</groupId>
            <artifactId>brotli4j</artifactId>
            <version>${brotli4j.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.aayushatharva.brotli4j</groupId>
            <artifactId>native-linux-x86_64</artifactId>
            <version>${brotli4j.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.aayushatharva.brotli4j</groupId>
            <artifactId>native-linux-aarch64</artifactId>
            <version>${brotli4j.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.aayushatharva.brotli4j</groupId>
            <artifactId>native-linux-riscv64</artifactId>
            <version>${brotli4j.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.aayushatharva.brotli4j</groupId>
            <artifactId>native-osx-x86_64</artifactId>
            <version>${brotli4j.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.aayushatharva.brotli4j</groupId>
            <artifactId>native-osx-aarch64</artifactId>
            <version>${brotli4j.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.aayushatharva.brotli4j</groupId>
            <artifactId>native-windows-x86_64</artifactId>
            <version>${brotli4j.version}</version>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>

        <dependency>
            <groupId>com.sun.activation</groupId>
            <artifactId>jakarta.activation</artifactId>
            <version>${activation.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
            <version>${jetbrains-annotations.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.14.0</version>
                <configuration>
                    <source>11</source>
                    <target>11</target>
                    <encoding>UTF-8</encoding>
                    <compilerArgs>
                        <arg>-XDcompilePolicy=simple</arg>
                        <arg>-Xplugin:ErrorProne
                            -Xep:JavaTimeDefaultTimeZone:ERROR
                            -Xep:JavaUtilDate:ERROR
                            -Xep:DateChecker:ERROR
                            -Xep:DateFormatConstant:ERROR
                            -Xep:EmptyBlockTag:ERROR
                            -Xep:VariableNameSameAsType:ERROR
                            -Xep:DoubleCheckedLocking:ERROR
                            -Xep:DefaultCharset:ERROR
                            -Xep:NullablePrimitive:ERROR
                            -Xep:NullOptional:ERROR
                            -XepExcludedPaths:.*/src/test/java/.*
                            -XepOpt:NullAway:AnnotatedPackages=org.asynchttpclient
                            -XepOpt:NullAway:UnannotatedSubPackages=org.asynchttpclient.netty,org.asynchttpclient.request
                            -XepOpt:NullAway:AcknowledgeRestrictiveAnnotations=true
                            -Xep:NullAway:ERROR
                        </arg>
                    </compilerArgs>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>com.google.errorprone</groupId>
                            <artifactId>error_prone_core</artifactId>
                            <version>2.31.0</version>
                        </path>
                        <path>
                            <groupId>com.uber.nullaway</groupId>
                            <artifactId>nullaway</artifactId>
                            <version>0.12.6</version>
                        </path>
                        <!-- Other annotation processors go here -->
                    </annotationProcessorPaths>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.5.2</version>
                <configuration>
                    <argLine>
                        @{argLine} --add-exports java.base/jdk.internal.misc=ALL-UNNAMED
                    </argLine>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.12</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

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

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

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>3.2.7</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                        <configuration>
                            <!-- Prevent gpg from using pinentry programs -->
                            <gpgArguments>
                                <arg>--pinentry-mode</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
