<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2020 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>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>9</version>
  </parent>

  <groupId>io.netty.incubator</groupId>
  <artifactId>netty-incubator-codec-http3</artifactId>
  <version>0.0.16.Final</version>
  <name>Netty/Incubator/Codec/Http3</name>
  <packaging>jar</packaging>
  <url>https://netty.io/</url>
  <description>
    Netty is an asynchronous event-driven network application framework for
    rapid development of maintainable high performance protocol servers and
    clients.
  </description>

  <organization>
    <name>The Netty Project</name>
    <url>https://netty.io/</url>
  </organization>

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

  <scm>
    <url>https://github.com/netty/netty-incubator-codec-http3</url>
    <connection>scm:git:git://github.com/netty/netty-incubator-codec-http3.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/netty/netty-incubator-codec-http3.git</developerConnection>
    <tag>netty-incubator-codec-http3-0.0.16.Final</tag>
  </scm>

  <developers>
    <developer>
      <id>netty.io</id>
      <name>The Netty Project Contributors</name>
      <email>netty@googlegroups.com</email>
      <url>https://netty.io/</url>
      <organization>The Netty Project</organization>
      <organizationUrl>https://netty.io/</organizationUrl>
    </developer>
  </developers>

  <properties>
    <javaModuleName>io.netty.incubator.codec.http3</javaModuleName>
    <skipTests>false</skipTests>
    <netty.version>4.1.85.Final</netty.version>
    <netty.build.version>30</netty.build.version>
    <netty.quic.version>0.0.34.Final</netty.quic.version>
    <netty.quic.classifier>${os.detected.name}-${os.detected.arch}</netty.quic.classifier>
    <junit.version>5.9.0</junit.version>
    <release.gpg.keyname />
    <release.gpg.passphrase />
    <test.argLine>-D_</test.argLine>
    <skipH3Spec>false</skipH3Spec>
  </properties>

  <build>
    <extensions>
      <extension>
        <groupId>kr.motd.maven</groupId>
        <artifactId>os-maven-plugin</artifactId>
        <version>1.7.0</version>
      </extension>
    </extensions>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>3.1.2</version>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.0</version>
        <configuration>
          <compilerVersion>1.8</compilerVersion>
          <fork>true</fork>
          <source>1.8</source>
          <target>1.8</target>
          <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>
      </plugin>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>3.1.0</version>
        <executions>
          <execution>
            <id>check-style</id>
            <goals>
              <goal>check</goal>
            </goals>
            <phase>validate</phase>
            <configuration>
              <consoleOutput>true</consoleOutput>
              <logViolationsToConsole>true</logViolationsToConsole>
              <failsOnError>true</failsOnError>
              <failOnViolation>true</failOnViolation>
              <configLocation>io/netty/checkstyle.xml</configLocation>
              <sourceDirectories>
                <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
                <sourceDirectory>${project.build.testSourceDirectory}</sourceDirectory>
               </sourceDirectories>
            </configuration>
            <inherited>false</inherited>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>com.puppycrawl.tools</groupId>
            <artifactId>checkstyle</artifactId>
            <version>8.29</version>
          </dependency>
          <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-build-common</artifactId>
            <version>${netty.build.version}</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.22.1</version>
        <configuration>
          <includes>
            <include>**/*Test*.java</include>
          </includes>
          <excludes>
            <exclude>**/Abstract*</exclude>
          </excludes>
          <runOrder>random</runOrder>
          <systemPropertyVariables>
            <logback.configurationFile>src/test/resources/logback-test.xml</logback.configurationFile>
            <logLevel>debug</logLevel>
          </systemPropertyVariables>
          <properties>
            <property>
              <name>listener</name>
              <value>io.netty.build.junit.TimedOutTestsListener</value>
            </property>
          </properties>
          <!-- Ensure the whole stacktrace is preserved when an exception is thrown. See https://issues.apache.org/jira/browse/SUREFIRE-1457 -->
          <trimStackTrace>false</trimStackTrace>
          <argLine>${test.argLine}</argLine>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.surefire</groupId>
            <artifactId>surefire-junit4</artifactId>
            <version>2.22.1</version>
          </dependency>
        </dependencies>
      </plugin>
      <!-- always produce osgi bundles -->
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.5.4</version>
        <executions>
          <execution>
            <id>generate-manifest</id>
            <phase>process-classes</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
            <configuration>
              <supportedProjectTypes>
                <supportedProjectType>jar</supportedProjectType>
                <supportedProjectType>bundle</supportedProjectType>
              </supportedProjectTypes>
              <instructions>
                <Export-Package>${project.groupId}.*</Export-Package>
              </instructions>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.2.0</version>
        <!-- Eclipse-related OSGi manifests
              See https://github.com/netty/netty/issues/3886
              More information: https://rajakannappan.blogspot.ie/2010/03/automating-eclipse-source-bundle.html -->
        <configuration>
          <archive>
            <manifestEntries>
              <Bundle-ManifestVersion>2</Bundle-ManifestVersion>
              <Bundle-Name>${project.name}</Bundle-Name>
              <Bundle-SymbolicName>${project.groupId}.${project.artifactId}.source</Bundle-SymbolicName>
              <Bundle-Vendor>${project.organization.name}</Bundle-Vendor>
              <Bundle-Version>${parsedVersion.osgiVersion}</Bundle-Version>
              <Eclipse-SourceBundle>${project.groupId}.${project.artifactId};version="${parsedVersion.osgiVersion}";roots:="."</Eclipse-SourceBundle>
            </manifestEntries>
          </archive>
        </configuration>

        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
          <execution>
            <id>attach-test-sources</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>test-jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.4</version>
        <configuration>
          <detectOfflineLinks>false</detectOfflineLinks>
          <breakiterator>true</breakiterator>
          <version>false</version>
          <author>false</author>
          <keywords>true</keywords>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.8.2</version>
        <configuration>
          <retryFailedDeploymentCount>10</retryFailedDeploymentCount>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.8</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>sonatype-nexus</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <!-- Automatically release the artifacts after the verification was complete -->
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
        <configuration>
          <useReleaseProfile>false</useReleaseProfile>
          <arguments>-P restricted-release,sonatype-oss-release -Dgpg.keyname=${release.gpg.keyname} -Dgpg.passphrase=${release.gpg.passphrase}</arguments>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <allowTimestampedSnapshots>false</allowTimestampedSnapshots>
          <tagNameFormat>${project.artifactId}-@{project.version}</tagNameFormat>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-api</artifactId>
            <version>1.9.4</version>
          </dependency>
          <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-provider-gitexe</artifactId>
            <version>1.9.4</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.2.0</version>
      </plugin>
      <plugin>
        <groupId>io.netty.incubator</groupId>
        <artifactId>netty-incubator-h3spec-maven-plugin</artifactId>
        <version>0.0.5.Final</version>
        <configuration>
          <delay>1000</delay>
          <mainClass>io.netty.incubator.codec.http3.Http3SpecTestServer</mainClass>
          <excludeSpecs>
            <!-- Let's only run the HTTP3 tests -->
            <excludeSpec>/QUIC</excludeSpec>
          </excludeSpecs>

          <skip>${skipH3Spec}</skip>
        </configuration>
        <executions>
          <execution>
            <phase>test</phase>
            <goals>
              <goal>h3spec</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>leak</id>
      <properties>
        <test.argLine>-Dio.netty.leakDetectionLevel=paranoid -Dio.netty.leakDetection.targetRecords=32</test.argLine>
      </properties>
    </profile>
  </profiles>

  <dependencies>
    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-common</artifactId>
      <version>${netty.version}</version>
    </dependency>
    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-buffer</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-http</artifactId>
      <version>${netty.version}</version>
    </dependency>
    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-transport</artifactId>
      <version>${netty.version}</version>
    </dependency>
    <dependency>
      <groupId>io.netty.incubator</groupId>
      <artifactId>netty-incubator-codec-classes-quic</artifactId>
      <version>${netty.quic.version}</version>
    </dependency>
    <dependency>
      <groupId>io.netty.incubator</groupId>
      <artifactId>netty-incubator-codec-native-quic</artifactId>
      <version>${netty.quic.version}</version>
      <classifier>linux-x86_64</classifier>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>io.netty.incubator</groupId>
      <artifactId>netty-incubator-codec-native-quic</artifactId>
      <version>${netty.quic.version}</version>
      <classifier>linux-aarch_64</classifier>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>io.netty.incubator</groupId>
      <artifactId>netty-incubator-codec-native-quic</artifactId>
      <version>${netty.quic.version}</version>
      <classifier>osx-x86_64</classifier>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>io.netty.incubator</groupId>
      <artifactId>netty-incubator-codec-native-quic</artifactId>
      <version>${netty.quic.version}</version>
      <classifier>osx-aarch_64</classifier>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>io.netty.incubator</groupId>
      <artifactId>netty-incubator-codec-native-quic</artifactId>
      <version>${netty.quic.version}</version>
      <classifier>windows-x86_64</classifier>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-library</artifactId>
      <version>1.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-build-common</artifactId>
      <version>${netty.build.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>1.1.7</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>3.6.28</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.surefire</groupId>
      <artifactId>surefire-junit4</artifactId>
      <version>2.22.1</version>
    </dependency>
  </dependencies>
</project>
