<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">

  <parent>
    <groupId>io.jooby</groupId>
    <artifactId>server</artifactId>
    <version>2.0.0.M1</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <artifactId>jooby-netty</artifactId>

  <dependencies>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>io.jooby</groupId>
      <artifactId>jooby</artifactId>
      <version>${jooby.version}</version>
    </dependency>

    <!-- Netty -->
    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-handler</artifactId>
    </dependency>

    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-codec-http</artifactId>
    </dependency>

    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-transport-native-epoll</artifactId>
      <optional>true</optional>
    </dependency>

    <!-- Test dependencies -->
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.jacoco</groupId>
      <artifactId>org.jacoco.agent</artifactId>
      <classifier>runtime</classifier>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.squareup.okhttp3</groupId>
      <artifactId>okhttp</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>${license-maven-plugin.version}</version>
        <configuration>
          <header>etc${file.separator}LICENSE</header>
          <strictCheck>true</strictCheck>
          <skipExistingHeaders>true</skipExistingHeaders>
          <includes>
            <include>src/main/java/**/*.java</include>
            <include>src/main/java/**/*.kt</include>
          </includes>
        </configuration>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>format</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <!-- Netty: -->
    <profile>
      <id>netty-linux</id>
      <activation>
        <os>
          <family>linux</family>
        </os>
      </activation>
      <dependencies>
        <!-- epoll -->
        <dependency>
          <groupId>io.netty</groupId>
          <artifactId>netty-transport-native-epoll</artifactId>
          <version>${netty.version}</version>
        </dependency>
        <dependency>
          <groupId>io.netty</groupId>
          <artifactId>netty-transport-native-epoll</artifactId>
          <version>${netty.version}</version>
          <classifier>linux-x86_64</classifier>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>netty-windows_x86</id>
      <activation>
        <os>
          <family>windows</family>
        </os>
      </activation>
    </profile>
    <profile>
      <id>netty-mac_x86_64</id>
      <activation>
        <os>
          <family>mac</family>
        </os>
      </activation>
    </profile>
  </profiles>
</project>
