<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.netmoor.moorhaven</groupId>
        <artifactId>moorhaven-parent</artifactId>
        <version>0.3.0-SNAPSHOT</version>
    </parent>

    <artifactId>moorhaven-photo-ai</artifactId>
    <name>Moorhaven :: Photo AI</name>
    <description>Photo intelligence — embeddings, semantic search, faces (config-gated, off by default)</description>

    <properties>
        <!-- Coverage ratchet (#50): own-module line coverage at measurement time minus
             a 2pp safety margin, see doc/coverage-baseline.md. Ratchet-only: raise when
             coverage improves, never lower. -->
        <jacoco.min>0.58</jacoco.min>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.netmoor.moorhaven</groupId>
            <artifactId>moorhaven-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.netmoor.moorhaven</groupId>
            <artifactId>moorhaven-media-library</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <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>
    </dependencies>

    <!-- ONNX Runtime native (moorhaven-onnxruntime-slim = onnxruntime repacked for the target
         platform, see the native-* profiles): CPU by default; -Pgpu swaps in the CUDA build
         (onnxruntime_gpu). Both expose the same ai.onnxruntime API, so exactly
         one must be on the classpath — hence mutually exclusive profiles. -->
    <profiles>
        <profile>
            <id>cpu</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>com.netmoor.moorhaven</groupId>
                    <artifactId>moorhaven-onnxruntime-slim</artifactId>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>gpu</id>
            <dependencies>
                <dependency>
                    <groupId>com.microsoft.onnxruntime</groupId>
                    <artifactId>onnxruntime_gpu</artifactId>
                    <version>${onnxruntime.version}</version>
                </dependency>
            </dependencies>
        </profile>
    </profiles>

</project>
