<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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.julien-dubois.bootui</groupId>
        <artifactId>bootui-parent</artifactId>
        <version>1.9.0</version>
    </parent>

    <artifactId>bootui-engine</artifactId>
    <name>BootUI :: Engine</name>
    <description>Framework-neutral services and advisor engines that implement BootUI behavior for every adapter.</description>

    <dependencies>
        <dependency>
            <groupId>com.julien-dubois.bootui</groupId>
            <artifactId>bootui-core</artifactId>
        </dependency>

        <dependency>
            <groupId>io.micrometer</groupId>
            <artifactId>micrometer-core</artifactId>
        </dependency>

        <!--
          ArchUnit powers the framework-neutral architecture/readiness advisor engines. It is static
          bytecode analysis (not a host framework or transport API), so it is allowed by the engine
          boundary tripwire, analogous to the sanctioned Micrometer dependency.
        -->
        <dependency>
            <groupId>com.tngtech.archunit</groupId>
            <artifactId>archunit</artifactId>
        </dependency>

        <!--
          jakarta.persistence is a neutral JCP standard (same API on Spring Boot and Quarkus). Optional so it
          is not forced on the engine's downstream consumers; JpaMetamodelReader is the sole importer and is
          only invoked from the Spring/Quarkus adapter behind a @ConditionalOnClass / CDI presence gate.
        -->
        <dependency>
            <groupId>jakarta.persistence</groupId>
            <artifactId>jakarta.persistence-api</artifactId>
            <optional>true</optional>
        </dependency>

        <!--
          OpenTelemetry SDK powers the in-process span capture (BootUiSpanExporter) feeding TelemetryStore.
          Optional so it is not forced on the engine's downstream consumers; BootUiSpanExporter is the sole
          importer (pinned by an ArchUnit concentration rule) and is only constructed by the adapter behind a
          @ConditionalOnClass / CDI presence gate. Versions are BOM-managed (spring-boot-dependencies).
        -->
        <dependency>
            <groupId>io.opentelemetry</groupId>
            <artifactId>opentelemetry-api</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>io.opentelemetry</groupId>
            <artifactId>opentelemetry-sdk-trace</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.tngtech.archunit</groupId>
            <artifactId>archunit-junit5</artifactId>
            <scope>test</scope>
        </dependency>

        <!--
          Test-scope only: the architecture rule-detection tests need real framework-annotated bytecode
          (e.g. @Service, @Transactional, @RestController, BeanPostProcessor, and plain jakarta.inject /
          jakarta.transaction annotations for the CDI/Quarkus-neutrality fixtures) to verify the curated
          rules fire correctly. These never reach the production classpath, and the engine boundary
          tripwire excludes test classes (DoNotIncludeTests), so the engine stays framework-neutral in
          production.
        -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-commons</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.annotation</groupId>
            <artifactId>jakarta.annotation-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.ws.rs</groupId>
            <artifactId>jakarta.ws.rs-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.inject</groupId>
            <artifactId>jakarta.inject-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.transaction</groupId>
            <artifactId>jakarta.transaction-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>

        <!--
          Test-scope only: JdbcActivityStoreTests exercises the plain-JDBC Live Activity persistence
          store against a real, disposable database rather than mocking java.sql.*. H2's version is
          managed by the imported spring-boot-dependencies BOM.
        -->
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
