<?xml version="1.0"?>
<!--
  ~ Copyright 2026 the original author or authors.
  ~
  ~ Licensed 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
  ~
  ~        http://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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>io.rest-assured</groupId>
        <artifactId>modules</artifactId>
        <version>7.0.0-RC1</version>
    </parent>
    <artifactId>http-client-jdk</artifactId>
    <packaging>bundle</packaging>
    <version>7.0.0-RC1</version>
    <name>http-client-jdk</name>
    <description>Sends REST Assured's requests with the HTTP client of the JDK (java.net.http.HttpClient).</description>
    <url>https://rest-assured.io/</url>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <build>
        <!-- The version file in META-INF/rest-assured, which REST Assured reads to check that its artifacts have the same version -->
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>src/main/rest-assured-version</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <!-- Checks that this module doesn't bring Groovy (see the root pom) -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Export-Package>io.restassured.http.jdk</Export-Package>
                        <!-- REST Assured finds the provider with ServiceLoader, which SPI Fly makes work in OSGi -->
                        <Provide-Capability>osgi.serviceloader;osgi.serviceloader=io.restassured.common.spi.http.HttpClientProvider</Provide-Capability>
                        <Require-Capability>osgi.extender;filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional</Require-Capability>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.basepom.maven</groupId>
                <artifactId>duplicate-finder-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <!-- The JDK client reads the schemes once, so ProxyLoginTest can only see Basic login through a tunnel
                         when it's allowed from the start -->
                    <argLine>-Dfile.encoding=${project.build.sourceEncoding} -Djdk.http.auth.tunneling.disabledSchemes=</argLine>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured-common</artifactId>
            <version>7.0.0-RC1</version>
        </dependency>

        <!-- Test. Not rest-assured, which uses this module in its own tests -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
