<?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">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>de.cuioss</groupId>
        <artifactId>cui-http-parent</artifactId>
        <version>1.4.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <artifactId>cui-http</artifactId>
    <packaging>jar</packaging>
    <name>CUI HTTP</name>
    <description>Provides a number of http-related utilities.</description>
    <properties>
        <maven.jar.plugin.automatic.module.name>de.cuioss.http</maven.jar.plugin.automatic.module.name>
    </properties>
    <dependencies>
        <dependency>
            <groupId>de.cuioss</groupId>
            <artifactId>cui-java-tools</artifactId>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jspecify</groupId>
            <artifactId>jspecify</artifactId>
        </dependency>
        <dependency>
            <groupId>de.cuioss.test</groupId>
            <artifactId>cui-test-generator</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- Unit testing -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
        </dependency>
        <dependency>
            <groupId>de.cuioss.test</groupId>
            <artifactId>cui-test-mockwebserver-junit5</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>de.cuioss.test</groupId>
            <artifactId>cui-test-value-objects</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>de.cuioss.test</groupId>
            <artifactId>cui-test-juli-logger</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <!-- Create separate generators artifact for security testing utilities -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <id>generators</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <classifier>generators</classifier>
                            <classesDirectory>${project.build.testOutputDirectory}</classesDirectory>
                            <includes>
                                <include>**/http/security/generators/**</include>
                                <include>**/http/security/database/**</include>
                            </includes>
                            <excludes>
                                <exclude>**/http/security/generators/**/*Test.class</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- Configure Surefire to run tests on classpath to bypass JPMS module restrictions -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <useModulePath>false</useModulePath>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
