<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2023 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.incubator</groupId>
    <artifactId>netty-incubator-codec-parent-ohttp</artifactId>
    <version>0.0.21.Final</version>
  </parent>

  <artifactId>netty-incubator-codec-ohttp</artifactId>
  <version>0.0.21.Final</version>
  <name>Netty/Incubator/Codec/OHTTP</name>
  <packaging>jar</packaging>

  <properties>
    <javaModuleName>io.netty.incubator.codec.ohttp</javaModuleName>
    <netty.hpke.boringssl.classifier>${os.detected.name}-${os.detected.arch}</netty.hpke.boringssl.classifier>
  </properties>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.2.0</version>
        <executions>
          <execution>
            <id>default-jar</id>
            <configuration>
              <archive>
                <manifest>
                  <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                  <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                </manifest>
                <manifestEntries>
                  <Automatic-Module-Name>${javaModuleName}</Automatic-Module-Name>
                </manifestEntries>
                <index>true</index>
                <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
              </archive>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-common</artifactId>
    </dependency>
    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-buffer</artifactId>
    </dependency>
    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-codec</artifactId>
    </dependency>
    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-codec-http</artifactId>
    </dependency>
    <dependency>
      <groupId>io.netty.incubator</groupId>
      <artifactId>netty-incubator-codec-bhttp</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>io.netty.incubator</groupId>
      <artifactId>netty-incubator-codec-ohttp-hpke</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-transport</artifactId>
    </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>io.netty.incubator</groupId>
      <artifactId>netty-incubator-codec-ohttp-hpke-bouncycastle</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.netty.incubator</groupId>
      <artifactId>netty-incubator-codec-ohttp-hpke-classes-boringssl</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.netty.incubator</groupId>
      <artifactId>netty-incubator-codec-ohttp-hpke-native-boringssl</artifactId>
      <version>${project.version}</version>
      <classifier>${netty.hpke.boringssl.classifier}</classifier>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>linux-aarch64</id>
      <properties>
        <netty.hpke.boringssl.classifier>linux-aarch_64</netty.hpke.boringssl.classifier>
      </properties>
    </profile>
    <profile>
      <id>mac-intel-cross-compile</id>
      <properties>
        <netty.hpke.boringssl.classifier>osx-x86_64</netty.hpke.boringssl.classifier>
      </properties>
    </profile>
  </profiles>
</project>
