<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2024 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.9.Final</version>
  </parent>
  <artifactId>netty-transport-classes-io_uring</artifactId>

  <name>Netty/Transport/Classes/io_uring</name>
  <packaging>jar</packaging>

  <properties>
    <javaModuleName>io.netty.transport.classes.io_uring</javaModuleName>
    <maven.compiler.source>1.9</maven.compiler.source>
    <maven.compiler.target>1.9</maven.compiler.target>
    <maven.compiler.release>9</maven.compiler.release>
  </properties>

  <dependencies>
    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-common</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-buffer</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-transport</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-transport-native-unix-common</artifactId>
      <version>${project.version}</version>
    </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>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <!--
          We need to compile everything except the IoUring class with Java9+
          The reason for this is that we want still be able to use IoUring.ensureAvaibility() on Java8.
        -->
        <executions>
          <execution>
            <id>default-compile</id>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <compilerVersion>1.9</compilerVersion>
              <fork>true</fork>
              <source>${maven.compiler.source}</source>
              <target>${maven.compiler.target}</target>
              <release>${maven.compiler.release}</release>
              <debug>true</debug>
              <optimize>true</optimize>
              <showDeprecation>true</showDeprecation>
              <showWarnings>true</showWarnings>
              <compilerArgument>-Xlint:-options</compilerArgument>
              <meminitial>256m</meminitial>
              <maxmem>1024m</maxmem>
              <excludes>
                <exclude>**/package-info.java</exclude>
              </excludes>
            </configuration>
          </execution>
          <execution>
            <id>compile-jdk8</id>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <compilerVersion>1.8</compilerVersion>
              <fork>true</fork>
              <source>1.8</source>
              <target>1.8</target>
              <release>8</release>
              <debug>true</debug>
              <optimize>true</optimize>
              <showDeprecation>true</showDeprecation>
              <showWarnings>true</showWarnings>
              <compilerArgument>-Xlint:-options</compilerArgument>
              <meminitial>256m</meminitial>
              <maxmem>1024m</maxmem>
              <includes>
                <include>**/IoUring.java</include>
              </includes>
            </configuration>
          </execution>
          <execution>
            <id>compile-tests-jdk8</id>
            <goals>
              <goal>testCompile</goal>
            </goals>
            <configuration>
              <compilerVersion>1.8</compilerVersion>
              <fork>true</fork>
              <source>1.8</source>
              <target>1.8</target>
              <release>8</release>
              <debug>true</debug>
              <optimize>true</optimize>
              <showDeprecation>true</showDeprecation>
              <showWarnings>true</showWarnings>
              <compilerArgument>-Xlint:-options</compilerArgument>
              <meminitial>256m</meminitial>
              <maxmem>1024m</maxmem>
            </configuration>
          </execution>
        </executions>

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