<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2012 The Netty Project
  ~
  ~ The Netty Project licenses this file to you 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:
  ~
  ~   https://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 https://maven.apache.org/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>io.netty</groupId>
    <artifactId>netty-parent</artifactId>
    <version>4.2.11.Final</version>
  </parent>

  <artifactId>netty-handler</artifactId>
  <packaging>jar</packaging>

  <properties>
    <javaModuleName>io.netty.handler</javaModuleName>
    <!-- Needed for SelfSignedCertificate -->
    <argLine.java9.extras>--add-exports java.base/sun.security.x509=ALL-UNNAMED</argLine.java9.extras>
  </properties>

  <name>Netty/Handler</name>

  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>netty-common</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>netty-resolver</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>netty-buffer</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>netty-transport</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>netty-transport-native-unix-common</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>netty-codec-base</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>netty-tcnative-classes</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>${tcnative.artifactId}</artifactId>
      <classifier>${tcnative.classifier}</classifier>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>netty-pkitesting</artifactId>
      <version>${project.version}</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.bouncycastle</groupId>
      <artifactId>bcpkix-jdk18on</artifactId>
      <optional>true</optional>
    </dependency>
    <!--
      Completely optional integration of netty-handler with Bouncy Castle.

      In particular, BouncyCastleAlpnSslUtils is using
      org.bouncycastle.jsse.{BCApplicationProtocolSelector,BCSSLEngine}
      via reflection, loading them via Class.forName(String).

      This method of use leads to zero bytecode-level traces of this
      dependency and works for plain Java without any further reference to
      bctls.

      maven-bundle-plugin recognizes the invocation of Class.forName() parses
      its argument to recognize the call requires the org.bouncycastle.jsse
      to succeed. It generates an Import-Package stanza for it, resulting in
      a bundle which does not resolve without bctls.

      This declaration, along with its corresponding dependency declaration
      in netty-handler, provides the additional information about our use.
      Its presence allows maven-bundle-plugin to observe
      'org.bouncycastle.jsse' to live in an optional dependency, which is
      enough for it to also add ';resolution=optional' and thus netty-handler
      will resolve successfully even when bctls is not present, matching our
      intent.
    -->
    <dependency>
      <groupId>org.bouncycastle</groupId>
      <artifactId>bctls-jdk18on</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>${conscrypt.groupId}</groupId>
      <artifactId>${conscrypt.artifactId}</artifactId>
      <classifier>${conscrypt.classifier}</classifier>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
    </dependency>

    <dependency>
      <groupId>software.amazon.cryptools</groupId>
      <artifactId>AmazonCorrettoCryptoProvider</artifactId>
      <version>${corretto.version}</version>
      <classifier>${corretto.classifier}</classifier>
      <scope>test</scope>
    </dependency>

    <!-- Automatic native-image reflection metadata generation for handlers dependencies -->
    <dependency>
      <groupId>org.reflections</groupId>
      <artifactId>reflections</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>netty-transport</artifactId>
      <version>${project.version}</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>netty-testsuite-common</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>io.github.dmlloyd.module-info</groupId>
        <artifactId>module-info</artifactId>
        <executions>
          <execution>
            <id>module-info</id>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>

