<?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.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.7.18</version>
        <relativePath/>
    </parent>

    <groupId>com.zmrag</groupId>
    <artifactId>doc-converter</artifactId>
    <version>1.0.0</version>
    <packaging>jar</packaging>
    <name>zm-rag-doc-converter</name>
    <description>Document format conversion service using Spire.Office</description>

    <properties>
        <java.version>1.8</java.version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <!-- Web -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <!-- JPA + MySQL -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.33</version>
            <scope>runtime</scope>
        </dependency>

        <!-- Spire.Office local jars (from lib/) -->
        <dependency>
            <groupId>e-iceblue</groupId>
            <artifactId>spire-doc</artifactId>
            <version>local</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/lib/Spire.Doc.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>e-iceblue</groupId>
            <artifactId>spire-xls</artifactId>
            <version>local</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/lib/Spire.Xls.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>e-iceblue</groupId>
            <artifactId>spire-presentation</artifactId>
            <version>local</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/lib/Spire.Presentation.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>e-iceblue</groupId>
            <artifactId>spire-pdf</artifactId>
            <version>local</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/lib/Spire.Pdf.jar</systemPath>
        </dependency>

        <!-- Actuator for health checks -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>

        <!-- Lombok (optional, for reducing boilerplate) -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>

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

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <!-- Include system-scoped (local jar) dependencies in the fat jar -->
                    <includeSystemScope>true</includeSystemScope>
                    <excludes>
                        <exclude>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                        </exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
