<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.openfilz</groupId>
        <artifactId>openfilz-sdk</artifactId>
        <version>1.2.2</version>
    </parent>

    <artifactId>openfilz-sdk-samples-test</artifactId>
    <packaging>jar</packaging>
    <name>OpenFilz SDK Samples Tests</name>
    <description>Integration tests verifying SDK code samples against a running OpenFilz API</description>

    <properties>
        <maven.deploy.skip>true</maven.deploy.skip>
        <maven.install.skip>true</maven.install.skip>
    </properties>

    <!-- Testcontainers (2.x) is managed by spring-boot-dependencies -->

    <dependencies>
        <!-- Java SDK (blocking) -->
        <dependency>
            <groupId>org.openfilz</groupId>
            <artifactId>openfilz-sdk-java</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- Java SDK (reactive) -->
        <dependency>
            <groupId>org.openfilz</groupId>
            <artifactId>openfilz-sdk-java-reactive</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- OpenFilz API (for @SpringBootTest bootstrapping) -->
        <dependency>
            <groupId>org.openfilz</groupId>
            <artifactId>openfilz-api</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- Spring Boot Test -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-webflux</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Reactor test -->
        <dependency>
            <groupId>io.projectreactor</groupId>
            <artifactId>reactor-test</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Testcontainers (2.x renamed its modules with a testcontainers- prefix) -->
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers-junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers-postgresql</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- JUnit 5 -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>3.5.3</version>
                <configuration>
                    <includes>
                        <include>**/*IT.java</include>
                    </includes>
                    <!-- Netty 4.2 FFM direct buffers break JDK AsynchronousFileChannel on Windows
                         (netty/netty#16071) which hangs multipart uploads in tests -->
                    <argLine>-Dio.netty.noPreferDirect=true</argLine>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Skip javadoc and source for test-only module -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
