<?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/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.eclipse.jetty.quic</groupId>
    <artifactId>jetty-quic</artifactId>
    <version>12.0.25</version>
  </parent>
  <artifactId>jetty-quic-client</artifactId>
  <name>Core :: QUIC :: Client</name>

  <properties>
    <bundle-symbolic-name>${project.groupId}.client</bundle-symbolic-name>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.eclipse.jetty.quic</groupId>
      <artifactId>jetty-quic-common</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty.quic</groupId>
      <artifactId>jetty-quic-quiche-jna</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-slf4j-impl</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty.http2</groupId>
      <artifactId>jetty-http2-client-transport</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty.http2</groupId>
      <artifactId>jetty-http2-server</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty.quic</groupId>
      <artifactId>jetty-quic-server</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>enable-foreign</id>
      <activation>
        <jdk>[22,)</jdk>
      </activation>
      <!--
      This profile makes sure the Foreign binding is used for tests when running on JDK 22+.
      Older JDKs will revert to the JNA binding.
      -->
      <dependencies>
        <dependency>
          <groupId>org.eclipse.jetty.quic</groupId>
          <artifactId>jetty-quic-quiche-foreign</artifactId>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <!-- Make sure to use the Foreign binding by allowing native access to the foreign module. -->
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <argLine>@{argLine}
                ${jetty.surefire.argLine}
                --enable-native-access=ALL-UNNAMED</argLine>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
