<?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>io.github.kylinn</groupId>
        <artifactId>jydapp-framework-parent</artifactId>
        <version>1.1.0</version>
    </parent>
    <artifactId>jydapp-framework-ai</artifactId>
    <name>jydapp-framework-ai</name>
    <description>AI module: multi-profile LLM access, agent loop, tools, conversation memory, SSE streaming</description>
    <dependencies>
        <dependency>
            <groupId>io.github.kylinn</groupId>
            <artifactId>jydapp-framework-application</artifactId>
            <version>1.1.0</version>
        </dependency>
        <!-- 控制器 + SseEmitter + MultipartFile -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <!-- 测试 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- RAG：实体仓储复用框架 RepositoryBase + JdbcTemplate 原生 SQL（ai_chunk/pgvector） -->
        <dependency>
            <groupId>io.github.kylinn</groupId>
            <artifactId>jydapp-framework-infrastructure</artifactId>
            <version>1.1.0</version>
        </dependency>
        <!-- 文档解析：PDF / Word+Excel+PPT（纯 Java，信创无碍） -->
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>pdfbox</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
        </dependency>
        <!-- 集成测试：pgvector 容器 -->
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>postgresql</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- 模拟 OpenAI 兼容端点（含 SSE 流式响应） -->
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>mockwebserver</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <!-- -parameters：控制器 @PathVariable/@RequestParam 反射取参数名（对齐 api 模块） -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <compilerArgs>
                        <arg>-parameters</arg>
                    </compilerArgs>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                            <version>${lombok.version}</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <useSystemClassLoader>false</useSystemClassLoader>
                    <includes>
                        <include>**/*Test.java</include>
                        <include>**/*IT.java</include>
                    </includes>
                    <environmentVariables>
                        <DOCKER_HOST>tcp://localhost:2375</DOCKER_HOST>
                        <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
                    </environmentVariables>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
